aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
authorPaulb232016-03-26 20:31:23 +0000
committerRémi Verschelde2016-04-02 22:15:06 +0200
commit729dc5da83fd9451673c4e188f3121afe9267fa0 (patch)
tree229bec345b54bb10fefa44157ddf80c3e7bc987f /tools/editor/editor_node.cpp
parent54625bb7712cd0a3f819e2a0133aaf466a763f6e (diff)
downloadgodot-729dc5da83fd9451673c4e188f3121afe9267fa0.tar.gz
godot-729dc5da83fd9451673c4e188f3121afe9267fa0.tar.zst
godot-729dc5da83fd9451673c4e188f3121afe9267fa0.zip
Stopped save scene flicker, issue 4118
(cherry picked from commit 9d74b76a69b1fda38d8e0fc5a7460c79ad276420)
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index a6c1e00ad..76f111d0d 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2075,8 +2075,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
Node *scene = editor_data.get_edited_scene_root();
if (scene && scene->get_filename()!="") {
- //_save_scene(scene->get_filename());
- _save_scene_with_preview(scene->get_filename());
+ // save in background if in the script editor
+ if (_get_current_main_editor() == EDITOR_SCRIPT) {
+ _save_scene(scene->get_filename());
+ } else {
+ _save_scene_with_preview(scene->get_filename());
+ }
return;
};
// fallthrough to save_as