Merge pull request #30804 from hbina/fix_issue_30160

Fixed crash when making subresource unique in inspector dock
This commit is contained in:
Rémi Verschelde 2019-08-07 11:43:16 +02:00 committed by GitHub
commit f5f16e57fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1581,6 +1581,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property, bool p_in
get_inspector()->edit(NULL);
node_dock->set_node(NULL);
scene_tree_dock->set_selected(NULL);
inspector_dock->update(NULL);
return;
}
@ -1669,9 +1670,10 @@ void EditorNode::_edit_current() {
Resource *current_res = Object::cast_to<Resource>(current_obj);
ERR_FAIL_COND(!current_res);
scene_tree_dock->set_selected(NULL);
get_inspector()->edit(current_res);
scene_tree_dock->set_selected(NULL);
node_dock->set_node(NULL);
inspector_dock->update(NULL);
EditorNode::get_singleton()->get_import_dock()->set_edit_path(current_res->get_path());
int subr_idx = current_res->get_path().find("::");
@ -1698,9 +1700,11 @@ void EditorNode::_edit_current() {
if (current_node->is_inside_tree()) {
node_dock->set_node(current_node);
scene_tree_dock->set_selected(current_node);
inspector_dock->update(current_node);
} else {
node_dock->set_node(NULL);
scene_tree_dock->set_selected(NULL);
inspector_dock->update(NULL);
}
if (get_edited_scene() && get_edited_scene()->get_filename() != String()) {
@ -1720,6 +1724,8 @@ void EditorNode::_edit_current() {
get_inspector()->edit(current_obj);
node_dock->set_node(NULL);
scene_tree_dock->set_selected(NULL);
inspector_dock->update(NULL);
}
inspector_dock->set_warning(editable_warning);