Fix crash when deleting Hold Start note.

This commit is contained in:
veroxzik
2022-11-12 21:27:51 -05:00
parent 5cdbc48b7a
commit 8731159e32
2 changed files with 15 additions and 4 deletions
+5
View File
@@ -1822,6 +1822,11 @@ namespace BAKKA_Editor
SetNonHoldButtonState(true);
SetSelectedObject(NoteType.HoldJoint);
}
if (isRemoveHold)
{
SetNonHoldButtonState(true);
SetSelectedObject(note.NoteType);
}
}
else if (note.NoteType == NoteType.HoldJoint)
{
+10 -4
View File
@@ -138,8 +138,11 @@ namespace BAKKA_Editor.Operations
{
case NoteType.HoldStartNoBonus:
case NoteType.HoldStartBonusFlair:
nextNote.PrevNote = null;
nextNote.NoteType = Note.NoteType;
if (nextNote != null)
{
nextNote.PrevNote = null;
nextNote.NoteType = Note.NoteType;
}
break;
case NoteType.HoldJoint:
prevNote.NextNote = nextNote;
@@ -162,8 +165,11 @@ namespace BAKKA_Editor.Operations
{
case NoteType.HoldStartNoBonus:
case NoteType.HoldStartBonusFlair:
nextNote.PrevNote = Note;
nextNote.NoteType = nextNoteType;
if (nextNote != null)
{
nextNote.PrevNote = Note;
nextNote.NoteType = nextNoteType;
}
break;
case NoteType.HoldJoint:
prevNote.NextNote = Note;