GUI: scroll to cursor pos on click

This commit is contained in:
tildearrow 2021-12-23 22:20:54 -05:00
parent c41435353a
commit be4ad87a3a
1 changed files with 7 additions and 1 deletions

View File

@ -2145,7 +2145,13 @@ bool FurnaceGUI::loop() {
macroDragActive=false;
macroLoopDragActive=false;
waveDragActive=false;
if (selecting) finishSelection();
if (selecting) {
finishSelection();
if (cursor.xCoarse==selStart.xCoarse && cursor.xFine==selStart.xFine && cursor.y==selStart.y &&
cursor.xCoarse==selEnd.xCoarse && cursor.xFine==selEnd.xFine && cursor.y==selEnd.y) {
updateScroll(cursor.y);
}
}
break;
case SDL_MOUSEBUTTONDOWN:
aboutOpen=false;