diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-29 21:33:26 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-01-29 21:33:26 +0100 |
commit | 1d3722a6aa76ae5cafbadc6f48eaf6f0567d5845 (patch) | |
tree | 7ba2cb00d9462daea0517d79c6cf427155196f4d | |
parent | b65c495d6eefa0a33a58345cce89660a7cff101c (diff) | |
parent | 595c6248a3e7d988e34d53635737e906c1eed819 (diff) | |
download | redot-engine-1d3722a6aa76ae5cafbadc6f48eaf6f0567d5845.tar.gz |
Merge pull request #87170 from AThousandShips/run_fix
Fix reloading current scene forgetting path
-rw-r--r-- | editor/gui/editor_run_bar.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/gui/editor_run_bar.cpp b/editor/gui/editor_run_bar.cpp index 54fb60d074..a79dced69e 100644 --- a/editor/gui/editor_run_bar.cpp +++ b/editor/gui/editor_run_bar.cpp @@ -273,12 +273,13 @@ void EditorRunBar::play_main_scene(bool p_from_native) { } void EditorRunBar::play_current_scene(bool p_reload) { + String last_current_scene = run_current_filename; // This is necessary to have a copy of the string. + EditorNode::get_singleton()->save_default_environment(); stop_playing(); current_mode = RunMode::RUN_CURRENT; if (p_reload) { - String last_current_scene = run_current_filename; // This is necessary to have a copy of the string. _run_scene(last_current_scene); } else { _run_scene(); |