Refresh time change inputs

This commit is contained in:
Lasercar
2025-09-27 03:57:37 +08:00
committed by Hundrec
parent e533c87d08
commit 2d891a4248
2 changed files with 33 additions and 13 deletions
@@ -1,6 +1,7 @@
package funkin.ui.debug.charting.commands;
import funkin.data.song.SongData.SongTimeChange;
import funkin.ui.debug.charting.toolboxes.ChartEditorMetadataToolbox;
/**
* A command which modifies the give time change in the current song's time changes.
@@ -64,8 +65,12 @@ class ModifyTimeChangeCommand implements ChartEditorCommand
state.notePreviewViewportBoundsDirty = true;
state.scrollPositionInPixels = 0;
var metadataToolbox:ChartEditorMetadataToolbox = cast state.getToolbox(ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT);
Conductor.instance.mapTimeChanges(state.currentSongMetadata.timeChanges);
if (metadataToolbox != null) metadataToolbox.refreshTimeChangeInputs();
state.updateSongTime();
state.updateGridHeight();
}
@@ -92,8 +97,12 @@ class ModifyTimeChangeCommand implements ChartEditorCommand
state.notePreviewViewportBoundsDirty = true;
state.scrollPositionInPixels = 0;
var metadataToolbox:ChartEditorMetadataToolbox = cast state.getToolbox(ChartEditorState.CHART_EDITOR_TOOLBOX_METADATA_LAYOUT);
Conductor.instance.mapTimeChanges(state.currentSongMetadata.timeChanges);
if (metadataToolbox != null) metadataToolbox.refreshTimeChangeInputs(true);
state.updateSongTime();
state.updateGridHeight();
}