From befc2c0894209ddd3905e419d3b1df6fa6134431 Mon Sep 17 00:00:00 2001 From: Hanif Bin Ariffin Date: Wed, 24 Jul 2019 23:10:31 -0400 Subject: add forgotten calls to inspector_dock->update(...). I believe many calls to the said function was mistakenly left out leading to InspectorDock having a pointer to deleted values. As such, this commit introduces many such calls to inspector_dock where I believe is appropriate... --- editor/editor_node.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f1944bf63f..7c28fcb405 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1574,6 +1574,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; } @@ -1662,9 +1663,10 @@ void EditorNode::_edit_current() { Resource *current_res = Object::cast_to(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("::"); @@ -1691,9 +1693,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()) { @@ -1713,6 +1717,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); -- cgit v1.2.3