                 group     (-> (group-shape id frame-id selected selrect)
                               (geom/setup selrect))
 
-                index     (cph/position-on-parent (:id (first items)) objects)
+                index     (::index (first items))
 
                 rchanges  [{:type :add-obj
                             :id id

                                          (update :height #(/ % hprop))
                                          (assoc :left-offset left-offset)))))))))))

;; ---

(defn adjust-group-shapes
  [ids]

            objects  (get-in state [:workspace-data page-id :objects])
            items    (->> selected
                          (map #(get objects %))
                          (filter #(not= :frame (:type %)))
                          (map #(assoc % ::index (cph/position-on-parent (:id %) objects)))
                          (sort-by ::index))]

        (when (not-empty items)
          (let [selrect   (geom/selection-rect items)
                frame-id  (-> items first :frame-id)
