Fix dependency menu not showing up if scene failed to load.
(cherry picked from commit c0e872c05b
)
This commit is contained in:
parent
eb414422fe
commit
314dac441b
|
@ -3674,16 +3674,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
|||
|
||||
Error err;
|
||||
Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", ResourceFormatLoader::CACHE_MODE_REPLACE, &err);
|
||||
if (!sdata.is_valid()) {
|
||||
_dialog_display_load_error(lpath, err);
|
||||
opening_prev = false;
|
||||
|
||||
if (prev != -1) {
|
||||
set_current_scene(prev);
|
||||
editor_data.remove_scene(idx);
|
||||
}
|
||||
return ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (!p_ignore_broken_deps && dependency_errors.has(lpath)) {
|
||||
current_menu_option = -1;
|
||||
|
@ -3701,6 +3691,17 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
|||
return ERR_FILE_MISSING_DEPENDENCIES;
|
||||
}
|
||||
|
||||
if (!sdata.is_valid()) {
|
||||
_dialog_display_load_error(lpath, err);
|
||||
opening_prev = false;
|
||||
|
||||
if (prev != -1) {
|
||||
set_current_scene(prev);
|
||||
editor_data.remove_scene(idx);
|
||||
}
|
||||
return ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
dependency_errors.erase(lpath); // At least not self path.
|
||||
|
||||
for (KeyValue<String, HashSet<String>> &E : dependency_errors) {
|
||||
|
|
Loading…
Reference in New Issue