From 6500019ededd315e11b45a4aff4cc26ec88f9bde Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 6 Mar 2023 12:22:03 -0500 Subject: [PATCH] Autosave when pressing BACKSPACE to exit Chart Editor. --- source/editors/ChartingState.hx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index 29c4278ccc1..0ecddc86aa7 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -1695,6 +1695,9 @@ class ChartingState extends MusicBeatState if (FlxG.keys.justPressed.BACKSPACE) { + // Protect against lost data when quickly leaving the chart editor. + autosaveSong(); + PlayState.chartingMode = false; MusicBeatState.switchState(new editors.MasterEditorMenu()); FlxG.sound.playMusic(Paths.music('freakyMenu'));