mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Fixed a bug where if a scene hadn't been saved it would find a cyclical dependency.
This commit is contained in:
parent
92cc7b840e
commit
0e8987abaf
@ -83,6 +83,9 @@ Node* SceneTreeDock::instance(const String& p_file) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// If the scene hasn't been saved yet a cyclical dependency cannot exist.
|
||||
if (edited_scene->get_filename()!="") {
|
||||
|
||||
if (_cyclical_dependency_exists(edited_scene->get_filename(), instanced_scene)) {
|
||||
|
||||
accept->get_ok()->set_text("Ok");
|
||||
@ -90,6 +93,7 @@ Node* SceneTreeDock::instance(const String& p_file) {
|
||||
accept->popup_centered(Size2(300,90));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
instanced_scene->generate_instance_state();
|
||||
instanced_scene->set_filename( Globals::get_singleton()->localize_path(p_file) );
|
||||
|
Loading…
Reference in New Issue
Block a user