From be4ad87a3a65c721ea03e3b59906ff8e90c651fd Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 23 Dec 2021 22:20:54 -0500 Subject: [PATCH] GUI: scroll to cursor pos on click --- src/gui/gui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index b63ec927a..e5a5ec69f 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -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;