# HG changeset patch
# User Jan Vrany <jan.vrany@fit.cvut.cz>
# Date 1531918172 -7200
# Wed Jul 18 14:49:32 2018 +0200
# Branch jv
# Node ID c46e9ab3000c4bebab375675088574ef91a5e542
# Parent eef85526ca1f8bb222aa43ad99726d7d02918844
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
diff -r eef85526ca1f -r c46e9ab3000c MultiViewToolApplication.st
a
|
b
|
|
1249 | 1249 | |v| |
1250 | 1250 | |
1251 | 1251 | (v := self selectedWorkspacesTextView) notNil ifTrue:[ |
1252 | | v paste |
| 1252 | v pasteOrReplace |
1253 | 1253 | ] |
| 1254 | |
| 1255 | "Modified: / 18-07-2018 / 14:35:49 / jv" |
1254 | 1256 | ! |
1255 | 1257 | |
1256 | 1258 | paste:aString |
… |
… |
|
1429 | 1431 | |
1430 | 1432 | version_CVS |
1431 | 1433 | ^ '$Header$' |
| 1434 | ! |
| 1435 | |
| 1436 | version_HG |
| 1437 | |
| 1438 | ^ '$Changeset: <not expanded> $' |
1432 | 1439 | ! ! |
1433 | 1440 | |