Merge pull request #12735 from mhilbrunner/delete-clearselect
Editor: Update 2D viewport and inspector selection on delete.
This commit is contained in:
commit
1821915eb5
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user