diff options
author | Eugene Sandulenko | 2017-08-03 22:50:25 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-08-04 21:54:20 +0200 |
commit | 951244ac3facbb512966938c0c9acdd1eeb87ff6 (patch) | |
tree | 8b7d098e0ad432645b3b02b9355f74613c771218 /engines | |
parent | 23649e8d87bf2c1d8c93fa0c4a6502285b258429 (diff) | |
download | scummvm-rg350-951244ac3facbb512966938c0c9acdd1eeb87ff6.tar.gz scummvm-rg350-951244ac3facbb512966938c0c9acdd1eeb87ff6.tar.bz2 scummvm-rg350-951244ac3facbb512966938c0c9acdd1eeb87ff6.zip |
WAGE: Use MacTextWindow code for copying to clipboard
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/gui-console.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/engines/wage/gui-console.cpp b/engines/wage/gui-console.cpp index 53ccb55233..56c111ed5b 100644 --- a/engines/wage/gui-console.cpp +++ b/engines/wage/gui-console.cpp @@ -373,37 +373,7 @@ void Gui::drawInput() { } void Gui::actionCopy() { - if (_selectionStartX == -1) - return; - - int startX = _selectionStartX; - int startY = _selectionStartY; - int endX = _selectionEndX; - int endY = _selectionEndY; - - if (startY > endY) { - SWAP(startX, endX); - SWAP(endX, endY); - } - - _clipboard.clear(); - - for (int i = startY; i <= endY; i++) { - if (startY == endY) { - _clipboard = Common::String(&_lines[i].c_str()[startX], &_lines[i].c_str()[endX]); - break; - } - - if (i == startY) { - _clipboard += &_lines[i].c_str()[startX]; - _clipboard += '\n'; - } else if (i == endY) { - _clipboard += Common::String(_lines[i].c_str(), &_lines[i].c_str()[endX]); - } else { - _clipboard += _lines[i]; - _clipboard += '\n'; - } - } + _clipboard = _consoleWindow->getSelection(); _menu->enableCommand(kMenuEdit, kMenuActionPaste, true); } |