diff options
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r-- | editor/scene_tree_dock.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 0b293c9caf..611038a947 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -899,7 +899,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { // 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->reset_size(); delete_dialog->popup_centered(); } @@ -2575,7 +2575,7 @@ void SceneTreeDock::_files_dropped(Vector<String> p_files, NodePath p_to, int p_ menu_properties->set_item_metadata(menu_properties->get_item_count() - 1, p); } - menu_properties->set_size(Size2(1, 1)); + menu_properties->reset_size(); menu_properties->set_position(get_screen_position() + get_local_mouse_position()); menu_properties->popup(); } else if (!valid_properties.is_empty()) { @@ -2667,7 +2667,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_icon_shortcut(get_theme_icon(SNAME("Instance"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANTIATE); } - menu->set_size(Size2(1, 1)); + menu->reset_size(); menu->set_position(get_screen_position() + p_menu_pos); menu->popup(); return; @@ -2690,7 +2690,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { if (profile_allow_editing) { subresources.clear(); menu_subresources->clear(); - menu_subresources->set_size(Size2(1, 1)); + menu_subresources->reset_size(); _add_children_to_popup(selection.front()->get(), 0); if (menu->get_item_count() > 0) { menu->add_separator(); @@ -2831,7 +2831,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) { menu->add_separator(); menu->add_icon_shortcut(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), ED_SHORTCUT("scene_tree/delete", TTR("Delete Node(s)"), Key::KEY_DELETE), TOOL_ERASE); } - menu->set_size(Size2(1, 1)); + menu->reset_size(); menu->set_position(p_menu_pos); menu->popup(); } @@ -2843,7 +2843,7 @@ void SceneTreeDock::_open_tree_menu() { menu->add_check_item(TTR("Auto Expand to Selected"), TOOL_AUTO_EXPAND); menu->set_item_checked(menu->get_item_idx_from_text(TTR("Auto Expand to Selected")), EditorSettings::get_singleton()->get("docks/scene_tree/auto_expand_to_selected")); - menu->set_size(Size2(1, 1)); + menu->reset_size(); menu->set_position(get_screen_position() + get_local_mouse_position()); menu->popup(); } |