diff --git a/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx b/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx index ccf462c56..26322c6f9 100644 --- a/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx +++ b/source/funkin/ui/debug/charting/components/ChartEditorHoldNoteSprite.hx @@ -63,7 +63,7 @@ class ChartEditorHoldNoteSprite extends SustainTrail function updateHoldNoteGraphic():Void { var bruhStyle:NoteStyle = NoteStyleRegistry.instance.fetchEntry(noteStyle); - this.setupHoldNoteGraphic(bruhStyle); + setupHoldNoteGraphic(bruhStyle); zoom = 1.0; zoom *= bruhStyle.fetchHoldNoteScale(); diff --git a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx index f1223eb9c..d872eda38 100644 --- a/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx +++ b/source/funkin/ui/debug/charting/toolboxes/ChartEditorNoteDataToolbox.hx @@ -4,6 +4,8 @@ import haxe.ui.components.DropDown; import haxe.ui.components.TextField; import haxe.ui.events.UIEvent; import funkin.ui.debug.charting.util.ChartEditorDropdowns; +import funkin.ui.debug.charting.components.ChartEditorNoteSprite; +import funkin.ui.debug.charting.components.ChartEditorHoldNoteSprite; import funkin.play.notes.notestyle.NoteStyle; import funkin.play.notes.notekind.NoteKindManager; @@ -59,8 +61,32 @@ class ChartEditorNoteDataToolbox extends ChartEditorBaseToolbox if (!_initializing && chartEditorState.currentNoteSelection.length > 0) { // Edit the note data of any selected notes. + var noteSprites:Array = chartEditorState.renderedNotes.members.copy(); + var holdNoteSprites:Array = chartEditorState.renderedHoldNotes.members.copy(); for (note in chartEditorState.currentNoteSelection) { + // update note sprites + for (noteSprite in noteSprites) + { + if (noteSprite.noteData == note) + { + noteSprite.noteStyle = NoteKindManager.getNoteStyleId(chartEditorState.noteKindToPlace) ?? chartEditorState.currentSongNoteStyle; + noteSprites.remove(noteSprite); + break; + } + } + + // update hold note sprites + for (holdNoteSprite in holdNoteSprites) + { + if (holdNoteSprite.noteData == note) + { + holdNoteSprite.noteStyle = NoteKindManager.getNoteStyleId(chartEditorState.noteKindToPlace) ?? chartEditorState.currentSongNoteStyle; + holdNoteSprites.remove(holdNoteSprite); + break; + } + } + note.kind = chartEditorState.noteKindToPlace; } chartEditorState.saveDataDirty = true;