aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-03 10:56:14 +0200
committerEugene Sandulenko2017-08-04 21:54:20 +0200
commit49ad5ff0cf6f8c943914d22355facb1cfca1c59e (patch)
tree0babe1f202ee17d8d5b6beb6250e7d5574300cd1
parent145b7c9ec994e97ad36527e177ccaf45f224d398 (diff)
downloadscummvm-rg350-49ad5ff0cf6f8c943914d22355facb1cfca1c59e.tar.gz
scummvm-rg350-49ad5ff0cf6f8c943914d22355facb1cfca1c59e.tar.bz2
scummvm-rg350-49ad5ff0cf6f8c943914d22355facb1cfca1c59e.zip
GRAPHICS: MACGUI: Do not draw text selection at beginning of selection
-rw-r--r--graphics/macgui/mactextwindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index 4fa8103f24..36c2bd6321 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -152,6 +152,9 @@ bool MacTextWindow::draw(ManagedSurface *g, bool forceRedraw) {
}
void MacTextWindow::drawSelection() {
+ if (_selectedText.endY == -1)
+ return;
+
int start = MIN(_selectedText.startY, _selectedText.endY);
start -= _scrollPos;
start = MAX(0, start);