From a8debfd10d033da2fe451b5a1462a7149c78af02 Mon Sep 17 00:00:00 2001 From: Lasercar Date: Sat, 15 Feb 2025 12:57:42 +1000 Subject: [PATCH] Don't open it if it's already open --- source/funkin/ui/debug/charting/ChartEditorState.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 6bc0e544b5..1e976919a0 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -2879,6 +2879,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState playbarBPM.onClick = _ -> { if (FlxG.keys.pressed.CONTROL) { + if (menubarItemToggleToolboxMetadata.selected) return; this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, true); // TODO: Figure out a way to prevent this from calling the on change event / opening the dialog twice menubarItemToggleToolboxMetadata.selected = true; @@ -2898,6 +2899,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState playbarDifficulty.onClick = _ -> { if (FlxG.keys.pressed.CONTROL) { + if (menubarItemToggleToolboxDifficulty.selected) return; this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, true); // TODO: Figure out a way to prevent this from calling the on change event / opening the dialog twice menubarItemToggleToolboxDifficulty.selected = true;