@@ -1196,6 +1196,7 @@ class Charter extends UIState {
11961196 var note : CharterNote = cast selected ;
11971197 note .strumLineID = strumLines .members .indexOf (note .strumLine );
11981198 note .strumLine = null ; // For static undos :D
1199+ CharterNote .callScriptOnNote (' onCharterNoteDelete' , note );
11991200 notesGroup .remove (note );
12001201 note .kill ();
12011202 } else if (selected is CharterEvent ) {
@@ -1215,9 +1216,11 @@ class Charter extends UIState {
12151216
12161217 notesGroup .autoSort = false ;
12171218 selection .loop (function (n : CharterNote ) {
1219+ final lastAlive = n .alive ;
12181220 n .strumLine = strumLines .members [n .strumLineID ];
12191221 n .revive ();
12201222 notesGroup .add (n );
1223+ if (! lastAlive ) CharterNote .callScriptOnNote (' onCharterNoteRevive' , n );
12211224 }, function (e : CharterEvent ) {
12221225 e .revive ();
12231226 (e .global ? rightEventsGroup : leftEventsGroup ).add (e );
@@ -1761,7 +1764,6 @@ class Charter extends UIState {
17611764 if (selection == null || selection .length == 0 ) return ;
17621765 selection .loop ((n : CharterNote ) -> {
17631766 noteDeleteAnims .deleteNotes .push ({note : n , time : noteDeleteAnims .deleteTime });
1764- CharterNote .callScriptOnNote (' onCharterNoteDelete' , n );
17651767 });
17661768 selection = deleteSelection (selection , true );
17671769 }
@@ -1776,7 +1778,6 @@ class Charter extends UIState {
17761778 if (oldNote != null && oldNote .step == note .step && oldNote .strumLineID == note .strumLineID && oldNote .id == note .id ) {
17771779 noteDeleteAnims .deleteNotes .push ({note : oldNote , time : noteDeleteAnims .deleteTime });
17781780 toDelete .push (oldNote );
1779- CharterNote .callScriptOnNote (' onCharterNoteDelete' , oldNote );
17801781 }
17811782 oldNote = note ;
17821783 }
0 commit comments