summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-29 21:33:26 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-29 21:33:26 +0100
commit1d3722a6aa76ae5cafbadc6f48eaf6f0567d5845 (patch)
tree7ba2cb00d9462daea0517d79c6cf427155196f4d
parentb65c495d6eefa0a33a58345cce89660a7cff101c (diff)
parent595c6248a3e7d988e34d53635737e906c1eed819 (diff)
downloadredot-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.cpp3
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();