diff options
author | Eugene Sandulenko | 2017-08-15 19:50:07 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-15 19:50:07 +0200 |
commit | df7bd3033e49672abe11f53318ba30a01ff85252 (patch) | |
tree | 0fdb2e38f667ea43cc68997e5d632ba4af5e95c6 | |
parent | b9a7f2c8004073871a698385fcf364639df02919 (diff) | |
download | scummvm-rg350-df7bd3033e49672abe11f53318ba30a01ff85252.tar.gz scummvm-rg350-df7bd3033e49672abe11f53318ba30a01ff85252.tar.bz2 scummvm-rg350-df7bd3033e49672abe11f53318ba30a01ff85252.zip |
GRAPHICS: MACGUI: Syncronise internal state when selection is cut
-rw-r--r-- | graphics/macgui/mactextwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp index 9a1898b044..9bbf2c8d10 100644 --- a/graphics/macgui/mactextwindow.cpp +++ b/graphics/macgui/mactextwindow.cpp @@ -264,8 +264,11 @@ Common::String MacTextWindow::cutSelection() { } int selPos = selStart - _inputText.c_str(); + Common::String newInput = Common::String(_inputText.c_str(), selPos) + Common::String(_inputText.c_str() + selPos + selection.size()); - _inputText = Common::String(_inputText.c_str(), selPos) + Common::String(_inputText.c_str() + selPos + selection.size()); + clearSelection(); + clearInput(); + appendInput(newInput); return selection; } |