diff options
author | mhilbrunner <m.hilbrunner@gmail.com> | 2017-11-08 03:10:31 +0100 |
---|---|---|
committer | mhilbrunner <m.hilbrunner@gmail.com> | 2017-11-08 03:10:31 +0100 |
commit | c755b684c9bcaac1e74f407feaf311b5457ddc64 (patch) | |
tree | 72060f4c5be02f18c556e5814a8a2be9f1462e8c /editor | |
parent | d4b19d8d830342bcb1812082ac623d81fa8305bc (diff) |
Editor: Update 2D viewport and inspector selection on delete. Fix #12591.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scene_tree_dock.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 7438c7671e..58f70ce11e 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -533,10 +533,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (p_confirm_override) { _delete_confirm(); - // hack, force 2d editor viewport to refresh after deletion - if (CanvasItemEditor *editor = CanvasItemEditor::get_singleton()) - editor->get_viewport_control()->update(); - } else { delete_dialog->set_text(TTR("Delete Node(s)?")); delete_dialog->popup_centered_minsize(); @@ -1345,6 +1341,12 @@ void SceneTreeDock::_delete_confirm() { } } editor_data->get_undo_redo().commit_action(); + + // hack, force 2d editor viewport to refresh after deletion + if (CanvasItemEditor *editor = CanvasItemEditor::get_singleton()) + editor->get_viewport_control()->update(); + + editor->push_item(NULL); } void SceneTreeDock::_selection_changed() { |