summaryrefslogtreecommitdiff
path: root/editor/scene_tree_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r--editor/scene_tree_dock.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index f0114b393d..16f1575757 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -759,7 +759,16 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
_delete_confirm();
} else {
- delete_dialog->set_text(TTR("Delete Node(s)?"));
+ if (remove_list.size() > 1) {
+ delete_dialog->set_text(vformat(TTR("Delete %d nodes?"), remove_list.size()));
+ } else {
+ delete_dialog->set_text(vformat(TTR("Delete node \"%s\"?"), remove_list[0]->get_name()));
+ }
+
+ // Resize the dialog to its minimum size.
+ // This prevents the dialog from being too wide after displaying
+ // a deletion confirmation for a node with a long name.
+ delete_dialog->set_size(Size2());
delete_dialog->popup_centered_minsize();
}