diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 15383a9cd..acc514f13 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1971,6 +1971,11 @@ void FurnaceGUI::drawSettings() { if (ImGui::RadioButton("Double-click##soloD",settings.soloAction==2)) { settings.soloAction=2; } + + bool pullDeleteBehaviorB=settings.pullDeleteBehavior; + if (ImGui::Checkbox("Move cursor up on backspace-delete",&pullDeleteBehaviorB)) { + settings.pullDeleteBehavior=pullDeleteBehaviorB; + } ImGui::EndTabItem(); } if (ImGui::BeginTabItem("Audio")) { @@ -2088,6 +2093,7 @@ void FurnaceGUI::syncSettings() { settings.patRowsBase=e->getConfInt("patRowsBase",0); settings.orderRowsBase=e->getConfInt("orderRowsBase",1); settings.soloAction=e->getConfInt("soloAction",0); + settings.pullDeleteBehavior=e->getConfInt("pullDeleteBehavior",1); } void FurnaceGUI::commitSettings() { @@ -2106,6 +2112,7 @@ void FurnaceGUI::commitSettings() { e->setConf("patRowsBase",settings.patRowsBase); e->setConf("orderRowsBase",settings.orderRowsBase); e->setConf("soloAction",settings.soloAction); + e->setConf("pullDeleteBehavior",settings.pullDeleteBehavior); e->saveConf(); @@ -2413,6 +2420,13 @@ void FurnaceGUI::doPullDelete() { prepareUndo(GUI_ACTION_PATTERN_PULL); curNibble=false; + if (settings.pullDeleteBehavior) { + if (--selStart.y<0) selStart.y=0; + if (--selEnd.y<0) selEnd.y=0; + if (--cursor.y<0) cursor.y=0; + updateScroll(cursor.y); + } + int iCoarse=selStart.xCoarse; int iFine=selStart.xFine; int ord=e->getOrder(); diff --git a/src/gui/gui.h b/src/gui/gui.h index 21ab71c75..e450c8663 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -188,6 +188,7 @@ class FurnaceGUI { int patRowsBase; int orderRowsBase; int soloAction; + int pullDeleteBehavior; unsigned int maxUndoSteps; String mainFontPath; String patFontPath; @@ -206,6 +207,7 @@ class FurnaceGUI { patRowsBase(0), orderRowsBase(1), soloAction(0), + pullDeleteBehavior(1), maxUndoSteps(100), mainFontPath(""), patFontPath("") {}