diff options
author | Tomasz Chabora <kobewi4e@gmail.com> | 2020-07-23 18:38:32 +0200 |
---|---|---|
committer | Tomasz Chabora <kobewi4e@gmail.com> | 2020-07-23 18:51:32 +0200 |
commit | 9c84e34fd444e0101a4169cadae46c1d28f6dc5f (patch) | |
tree | d0efcab2d2a40e4e461dfc20c8cf1d0a7c93ca91 /editor/editor_node.cpp | |
parent | f4c17da6f5609aac353d166d2b7d7b98a5934aba (diff) |
Fix run project when current scene was never saved
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 7cff3263f2..263ed9040a 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2052,7 +2052,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { String args; bool skip_breakpoints; - if (p_current || (editor_data.get_edited_scene_root() && p_custom == editor_data.get_edited_scene_root()->get_filename())) { + if (p_current || (editor_data.get_edited_scene_root() && p_custom != String() && p_custom == editor_data.get_edited_scene_root()->get_filename())) { Node *scene = editor_data.get_edited_scene_root(); if (!scene) { @@ -2082,13 +2082,7 @@ void EditorNode::_run(bool p_current, const String &p_custom) { if (unsaved_cache) { Node *scene = editor_data.get_edited_scene_root(); - if (scene) { //only autosave if there is a scene obviously - - if (scene->get_filename() == "") { - show_accept(TTR("Current scene was never saved, please save it prior to running."), TTR("OK")); - return; - } - + if (scene && scene->get_filename() != "") { // Only autosave if there is a scene and if it has a path. _save_scene_with_preview(scene->get_filename()); } } |