From 57fab1626966c8de64ab6d29f1f7e5ee1593297b Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 20 Jun 2022 16:24:14 -0500 Subject: [PATCH] GUI: add ability to drag to move when holding Ctrl --- src/gui/cursor.cpp | 2 +- src/gui/settings.cpp | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/gui/cursor.cpp b/src/gui/cursor.cpp index 19526268d..5a98a78c6 100644 --- a/src/gui/cursor.cpp +++ b/src/gui/cursor.cpp @@ -43,7 +43,7 @@ void FurnaceGUI::startSelection(int xCoarse, int xFine, int y, bool fullRow) { } } - if (settings.dragMovesSelection && !fullRow) { + if ((settings.dragMovesSelection==1 || (settings.dragMovesSelection==2 && (ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)))) && !fullRow) { if (xCoarse>=selStart.xCoarse && (xFine>=selStart.xFine || xCoarse>selStart.xCoarse) && y>=selStart.y && xCoarse<=selEnd.xCoarse && (xFine<=selEnd.xFine || xCoarsegetConfInt("effectValCellSpacing",0); settings.doubleClickColumn=e->getConfInt("doubleClickColumn",1); settings.blankIns=e->getConfInt("blankIns",0); - settings.dragMovesSelection=e->getConfInt("dragMovesSelection",1); + settings.dragMovesSelection=e->getConfInt("dragMovesSelection",2); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.patFontSize,2,96); @@ -2127,7 +2133,7 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.effectValCellSpacing,0,32); clampSetting(settings.doubleClickColumn,0,1); clampSetting(settings.blankIns,0,1); - clampSetting(settings.dragMovesSelection,0,1); + clampSetting(settings.dragMovesSelection,0,2); settings.initialSys=e->decodeSysDesc(e->getConfString("initialSys","")); if (settings.initialSys.size()<4) {