summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-07 11:43:16 +0200
committerGitHub <noreply@github.com>2019-08-07 11:43:16 +0200
commitf5f16e57fdbae84c063bb0c2e6185921e719f3c3 (patch)
treec5b9e6dea8d4b9ee71c3914d2676959366fbfe33
parent765839b2ad9034a7e3905aad081be1eeca2f0fb8 (diff)
parentbefc2c0894209ddd3905e419d3b1df6fa6134431 (diff)
Merge pull request #30804 from hbina/fix_issue_30160
Fixed crash when making subresource unique in inspector dock
-rw-r--r--editor/editor_node.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 4326174a1a..ae2a6d2802 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -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);