From 849eb8fb13303d0ea2e42f2a353cadff5e103ac4 Mon Sep 17 00:00:00 2001 From: Raymonf Date: Sat, 4 Feb 2023 15:37:19 -0500 Subject: [PATCH] fix: prevent use of hold button while inserting a hold --- BAKKA-Editor/MainForm.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BAKKA-Editor/MainForm.cs b/BAKKA-Editor/MainForm.cs index 82fcedf..493bac2 100644 --- a/BAKKA-Editor/MainForm.cs +++ b/BAKKA-Editor/MainForm.cs @@ -30,6 +30,7 @@ namespace BAKKA_Editor Note lastNote; Note? nextSelectedNote; // so that we know the last newly inserted note Note? endOfChartNote; + bool isInsertingHold = false; // Music ISoundEngine soundEngine = new ISoundEngine(); @@ -728,6 +729,10 @@ namespace BAKKA_Editor private void holdButtonClicked() { + // don't reset hold state if we're already inserting a hold + if (isInsertingHold) + return; + if (noBonusRadio.Checked) SetSelectedObject(NoteType.HoldStartNoBonus); else if (bonusRadio.Checked) @@ -1197,6 +1202,8 @@ namespace BAKKA_Editor private void SetNonHoldButtonState(bool state) { + isInsertingHold = !state; + tapButton.Enabled = state; orangeButton.Enabled = state; greenButton.Enabled = state; -- 2.54.0