From 8b81bb2faabde88d6d00e938360f21f2c97ad774 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 6 Aug 2017 22:42:34 +0200 Subject: GRAPHICS: MACGUI: Better handling for displaying selection end --- graphics/macgui/mactextwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'graphics/macgui') diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp index 854675de98..c56506c8da 100644 --- a/graphics/macgui/mactextwindow.cpp +++ b/graphics/macgui/mactextwindow.cpp @@ -195,7 +195,7 @@ void MacTextWindow::drawSelection() { numLines = _mactext->getLineHeight(s.startRow); x1 = s.startX; } - if (y + _scrollPos == lastLineStart + 1) { + if (y + _scrollPos > lastLineStart) { numLines = _mactext->getLineHeight(s.endRow); x2 = s.endX; } @@ -364,6 +364,10 @@ void MacTextWindow::updateTextSelection(int x, int y) { _mactext->getRowCol(x, y, &_selectedText.endX, &_selectedText.endY, &_selectedText.endRow, &_selectedText.endCol); + debug(3, "s: %d,%d (%d, %d) e: %d,%d (%d, %d)", _selectedText.startX, _selectedText.startY, + _selectedText.startRow, _selectedText.startCol, _selectedText.endX, + _selectedText.endY, _selectedText.endRow, _selectedText.endCol); + _contentIsDirty = true; } -- cgit v1.2.3