                                                      :layer/start-x (:layer/start-x layer)
                                                      :layer/end-x (:layer/end-x layer)
                                                      :layer/current-x (:layer/end-x layer)
-                                                     :layer/current-y (:layer/end-y layer)))
+                                                     :layer/current-y (:layer/end-y layer)
+                                                     :layer/ui-id (when (:layer/ui-id layer)
+                                                                    (inc-str-id (:layer/ui-id layer)))
+                                                     :layer/ui-action (when (:layer/ui-action layer)
+                                                                        (inc-str-id (:layer/ui-action layer)))))
                                                  layers entity-ids)
                                            group-layer))
         (assoc-in [:drawing :moving?] true)

                (update-in [:entity-ids] disj entity-id))]
            r)))

(defmethod control-event :layer-duplicated
  [browser-state message {:keys [layer x y]} state]
  (let [[rx ry] (cameras/screen->point (:camera state) x y)

                                        :layer/start-x (:layer/start-x layer)
                                        :layer/end-x (:layer/end-x layer)
                                        :layer/current-x (:layer/end-x layer)
                                        :layer/current-y (:layer/end-y layer)
                                        :layer/ui-id (when (:layer/ui-id layer)
                                                       (inc-str-id (:layer/ui-id layer)))
                                        :layer/ui-action (when (:layer/ui-action layer)
                                                           (inc-str-id (:layer/ui-action layer))))])
        (assoc-in [:drawing :moving?] true)
        (assoc-in [:drawing :starting-mouse-position] [rx ry])
        (update-in [:entity-ids] disj entity-id))))
