          (* (- adjusted-doc-y mouse-down-y) zoom-factor))))
 
   (when (= paint-tool :selection)
-    (let [user-is-moving-selection (om/get-state owner :user-is-moving-selection)]
+    (let [user-is-moving-selection (om/get-state owner :user-is-moving-selection)
+          selection-was-pasted (om/get-state owner :selection-was-pasted)]
       (when (not user-is-moving-selection)
         (clear-preview-canvas)
         (set! (.-fillStyle preview-context) "rgba(127,127,127,0.3)")

              blit-y (- doc-y offset-y)]
          (clear-preview-canvas)
          (set! (.-fillStyle preview-context) (get-in @app [:tools :paint-color]))
          (.fillRect preview-context
             (* x1 zoom-factor)
             (* y1 zoom-factor)
             (* (- x2 x1) zoom-factor)
             (* (- y2 y1) zoom-factor))
          (blit-sub-image @app (om/get-state owner :selection-image) blit-x blit-y)))))))



              [x1 y1 x2 y2] (om/get-state owner :selection)
              paste-x (- doc-x xOff)
              paste-y (- doc-y yOff)
              selection-was-pasted (om/get-state owner :selection-was-pasted)
              backfill (create-sub-image-for-rect (om/get-state owner :selection)
                                                  (get-in @app [:tools :paint-color]))]
        (when (not selection-was-pasted)
          (paste-image app owner x1 y1 backfill))
        (paste-image app owner paste-x paste-y (om/get-state owner :selection-image)))
        (clear-selection-state owner)
        (om/transact! app
