[Scummvm-git-logs] scummvm master -> 7896e9572fe538f3115bcf54e6b0eb229e709c44
sev-
sev at scummvm.org
Mon Aug 7 12:18:32 CEST 2017
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6e690dbca9 GRAPHICS: MACGUI: Do not draw selection in the initial state
abf6abdb65 GRAPHICS: MACGUI: Correctly display last selection line
d51a87a83b GRAPHICS: MACGUI: Correctly expand selection beyond last line
7896e9572f GRAPHICS: MACGUI: Correctly process revere oneliner selections
Commit: 6e690dbca9410f6dfbbcd3a008696d9ba288e40c
https://github.com/scummvm/scummvm/commit/6e690dbca9410f6dfbbcd3a008696d9ba288e40c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-07T12:18:20+02:00
Commit Message:
GRAPHICS: MACGUI: Do not draw selection in the initial state
Changed paths:
graphics/macgui/mactextwindow.h
diff --git a/graphics/macgui/mactextwindow.h b/graphics/macgui/mactextwindow.h
index dfc7072..50f908a 100644
--- a/graphics/macgui/mactextwindow.h
+++ b/graphics/macgui/mactextwindow.h
@@ -35,10 +35,10 @@ struct SelectedText {
int endRow, endCol;
SelectedText() {
- startX = startY = 0;
- endX = endY = 0;
- startRow = startCol = 0;
- endRow = endCol = 0;
+ startX = startY = -1;
+ endX = endY = -1;
+ startRow = startCol = -1;
+ endRow = endCol = -1;
}
bool needsRender() {
Commit: abf6abdb65dce0e583c8ac870c86d366313a5ab8
https://github.com/scummvm/scummvm/commit/abf6abdb65dce0e583c8ac870c86d366313a5ab8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-07T12:18:20+02:00
Commit Message:
GRAPHICS: MACGUI: Correctly display last selection line
Changed paths:
graphics/macgui/mactextwindow.cpp
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index c56506c..2f0e95f 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) {
+ if (y + _scrollPos >= lastLineStart) {
numLines = _mactext->getLineHeight(s.endRow);
x2 = s.endX;
}
Commit: d51a87a83bf187b1865d66d2e603217d0f05be79
https://github.com/scummvm/scummvm/commit/d51a87a83bf187b1865d66d2e603217d0f05be79
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-07T12:18:20+02:00
Commit Message:
GRAPHICS: MACGUI: Correctly expand selection beyond last line
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index d7c3795..9db5d45 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -448,6 +448,10 @@ void MacText::removeLastLine() {
}
void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
+ if (y > _textMaxHeight) {
+ x = _surface->w;
+ }
+
y = CLIP(y, 0, _textMaxHeight);
// FIXME: We should use bsearch() here
@@ -456,9 +460,6 @@ void MacText::getRowCol(int x, int y, int *sx, int *sy, int *row, int *col) {
while (*row && _textLines[*row].y > y)
(*row)--;
- if (y > _textMaxHeight)
- x = _surface->w;
-
*sy = _textLines[*row].y;
*col = 0;
Commit: 7896e9572fe538f3115bcf54e6b0eb229e709c44
https://github.com/scummvm/scummvm/commit/7896e9572fe538f3115bcf54e6b0eb229e709c44
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-08-07T12:18:20+02:00
Commit Message:
GRAPHICS: MACGUI: Correctly process revere oneliner selections
Changed paths:
graphics/macgui/mactextwindow.cpp
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index 2f0e95f..944eebd 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -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);
}
More information about the Scummvm-git-logs
mailing list