diff options
| author | Daniel J. Ramirez | 2017-11-11 21:48:00 -0600 |
|---|---|---|
| committer | Daniel J. Ramirez | 2017-11-12 13:41:44 -0600 |
| commit | 2932cc79ee712a0cb5abe3b327ffc9aad4463c80 (patch) | |
| tree | 2311ef5a677c897cafaafaa43cc00124c5a86c93 /editor/editor_node.cpp | |
| parent | 48d57e4a30e01d0f8eec54d469bc9e69a77240b2 (diff) | |
| download | godot-2932cc79ee712a0cb5abe3b327ffc9aad4463c80.tar.gz godot-2932cc79ee712a0cb5abe3b327ffc9aad4463c80.tar.zst godot-2932cc79ee712a0cb5abe3b327ffc9aad4463c80.zip | |
Update meshes when reimporting,
Save scene preview even when not doing save and play.
Diffstat (limited to 'editor/editor_node.cpp')
| -rw-r--r-- | editor/editor_node.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 9931f7531..e0cae7de5 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -872,7 +872,7 @@ void EditorNode::_find_node_types(Node *p_node, int &count_2d, int &count_3d) { _find_node_types(p_node->get_child(i), count_2d, count_3d); } -void EditorNode::_save_scene_with_preview(String p_file) { +void EditorNode::_save_scene_with_preview(String p_file, int p_idx) { EditorProgress save("save", TTR("Saving Scene"), 4); save.step(TTR("Analyzing"), 0); @@ -938,7 +938,7 @@ void EditorNode::_save_scene_with_preview(String p_file) { } save.step(TTR("Saving Scene"), 4); - _save_scene(p_file); + _save_scene(p_file, p_idx); EditorResourcePreview::get_singleton()->check_for_invalidation(p_file); } @@ -1096,10 +1096,7 @@ void EditorNode::_dialog_action(String p_file) { if (file->get_mode() == EditorFileDialog::MODE_SAVE_FILE) { _save_default_environment(); - if (scene_idx != editor_data.get_edited_scene()) - _save_scene(p_file, scene_idx); - else - _save_scene_with_preview(p_file); + _save_scene_with_preview(p_file, scene_idx); if (scene_idx != -1) _discard_changes(); @@ -1826,7 +1823,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { if (scene && scene->get_filename() != "") { if (scene_idx != editor_data.get_edited_scene()) - _save_scene(scene->get_filename(), scene_idx); + _save_scene_with_preview(scene->get_filename(), scene_idx); else _save_scene_with_preview(scene->get_filename()); |
