GRAPHICS: MACGUI: Correctly process revere oneliner selections

This commit is contained in:
Eugene Sandulenko 2017-08-07 12:02:57 +02:00
parent d51a87a83b
commit 7896e9572f

View File

@ -160,7 +160,7 @@ void MacTextWindow::drawSelection() {
SelectedText s = _selectedText;
if (s.startY > s.endY) {
if (s.startY > s.endY || (s.startY == s.endY && s.startX > s.endX)) {
SWAP(s.startX, s.endX);
SWAP(s.startY, s.endY);
SWAP(s.startRow, s.endRow);
@ -219,7 +219,7 @@ Common::String MacTextWindow::getSelection(bool formatted) {
SelectedText s = _selectedText;
if (s.startY > s.endY) {
if (s.startY > s.endY || (s.startY == s.endY && s.startX > s.endX)) {
SWAP(s.startRow, s.endRow);
SWAP(s.startCol, s.endCol);
}