Merge pull request #30804 from hbina/fix_issue_30160
Fixed crash when making subresource unique in inspector dock
This commit is contained in:
commit
f5f16e57fd
@ -1581,6 +1581,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property, bool p_in
|
|||||||
get_inspector()->edit(NULL);
|
get_inspector()->edit(NULL);
|
||||||
node_dock->set_node(NULL);
|
node_dock->set_node(NULL);
|
||||||
scene_tree_dock->set_selected(NULL);
|
scene_tree_dock->set_selected(NULL);
|
||||||
|
inspector_dock->update(NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1669,9 +1670,10 @@ void EditorNode::_edit_current() {
|
|||||||
|
|
||||||
Resource *current_res = Object::cast_to<Resource>(current_obj);
|
Resource *current_res = Object::cast_to<Resource>(current_obj);
|
||||||
ERR_FAIL_COND(!current_res);
|
ERR_FAIL_COND(!current_res);
|
||||||
scene_tree_dock->set_selected(NULL);
|
|
||||||
get_inspector()->edit(current_res);
|
get_inspector()->edit(current_res);
|
||||||
|
scene_tree_dock->set_selected(NULL);
|
||||||
node_dock->set_node(NULL);
|
node_dock->set_node(NULL);
|
||||||
|
inspector_dock->update(NULL);
|
||||||
EditorNode::get_singleton()->get_import_dock()->set_edit_path(current_res->get_path());
|
EditorNode::get_singleton()->get_import_dock()->set_edit_path(current_res->get_path());
|
||||||
|
|
||||||
int subr_idx = current_res->get_path().find("::");
|
int subr_idx = current_res->get_path().find("::");
|
||||||
@ -1698,9 +1700,11 @@ void EditorNode::_edit_current() {
|
|||||||
if (current_node->is_inside_tree()) {
|
if (current_node->is_inside_tree()) {
|
||||||
node_dock->set_node(current_node);
|
node_dock->set_node(current_node);
|
||||||
scene_tree_dock->set_selected(current_node);
|
scene_tree_dock->set_selected(current_node);
|
||||||
|
inspector_dock->update(current_node);
|
||||||
} else {
|
} else {
|
||||||
node_dock->set_node(NULL);
|
node_dock->set_node(NULL);
|
||||||
scene_tree_dock->set_selected(NULL);
|
scene_tree_dock->set_selected(NULL);
|
||||||
|
inspector_dock->update(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_edited_scene() && get_edited_scene()->get_filename() != String()) {
|
if (get_edited_scene() && get_edited_scene()->get_filename() != String()) {
|
||||||
@ -1720,6 +1724,8 @@ void EditorNode::_edit_current() {
|
|||||||
|
|
||||||
get_inspector()->edit(current_obj);
|
get_inspector()->edit(current_obj);
|
||||||
node_dock->set_node(NULL);
|
node_dock->set_node(NULL);
|
||||||
|
scene_tree_dock->set_selected(NULL);
|
||||||
|
inspector_dock->update(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
inspector_dock->set_warning(editable_warning);
|
inspector_dock->set_warning(editable_warning);
|
||||||
|
Loading…
Reference in New Issue
Block a user