fix: prevent use of hold button while inserting a hold #15

Merged
Raymonf merged 1 commits from fix/don't-break-holds into C#-master 2023-02-04 23:43:39 +03:00
+7
View File
@@ -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;