Bläddra i källkod

enhance: don't clear selection after copied

close #1733
Tienson Qin 4 år sedan
förälder
incheckning
2e0c241ba6
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      src/main/frontend/handler/editor.cljs

+ 3 - 3
src/main/frontend/handler/editor.cljs

@@ -926,7 +926,8 @@
           [content tree] (compose-copied-blocks-contents-&-block-tree repo ids)
           [content tree] (compose-copied-blocks-contents-&-block-tree repo ids)
           block (db/pull [:block/uuid (first ids)])]
           block (db/pull [:block/uuid (first ids)])]
       (common-handler/copy-to-clipboard-without-id-property! (:block/format block) content)
       (common-handler/copy-to-clipboard-without-id-property! (:block/format block) content)
-      (state/set-copied-blocks content tree))))
+      (state/set-copied-blocks content tree)
+      (notification/show! "Copied!" :success))))
 
 
 (defn cut-selection-blocks
 (defn cut-selection-blocks
   [copy?]
   [copy?]
@@ -2444,8 +2445,7 @@
 
 
 (defn shortcut-copy-selection
 (defn shortcut-copy-selection
   [e]
   [e]
-  (copy-selection-blocks)
-  (clear-selection! nil))
+  (copy-selection-blocks))
 
 
 (defn shortcut-cut-selection
 (defn shortcut-cut-selection
   [e]
   [e]