Issue #230: use `#pasteOrReplace` to implement paste menu item jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 18 Jul 2018 14:49:32 +0200
branchjv
changeset 18273 c46e9ab3000c
parent 18272 eef85526ca1f
child 18368 3877b0e95a78
Issue #230: use `#pasteOrReplace` to implement paste menu item ...rather than plain `#paste` with pastes text regardless of any possible selection. `#paste` should be considered as private to `EditTextView`. . The reason why it worked everywhere else was rather subtle. Everywhere else the "paste" shortcut was handled by edit view itself and hence it ended up in `#pasterOrReplace`. `WorkspaceApplication` however contains a 'paste' menu item with shortcut assigned so the shortcut processing machinery handled the 'paste; shortcut as menu item pick, thus calling (wrong) `#paste`. https://swing.fit.cvut.cz/projects/stx-jv/ticket/230
MultiViewToolApplication.st
--- a/MultiViewToolApplication.st	Tue Jul 17 19:35:06 2018 +0200
+++ b/MultiViewToolApplication.st	Wed Jul 18 14:49:32 2018 +0200
@@ -1249,8 +1249,10 @@
     |v|
 
     (v := self selectedWorkspacesTextView) notNil ifTrue:[
-        v paste
+        v pasteOrReplace
     ]
+
+    "Modified: / 18-07-2018 / 14:35:49 / jv"
 !
 
 paste:aString
@@ -1429,5 +1431,10 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !