From f5871c18bfbf41dbf5c20a7943c5bdd40cc020c3 Mon Sep 17 00:00:00 2001 From: Nodragem Date: Sun, 17 Nov 2024 13:01:25 +0000 Subject: [PATCH] fix hidden gizmo at start-up --- modules/gridmap/editor/grid_map_editor_plugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index 99e3b02dea2..0d522a0562d 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -1351,7 +1351,6 @@ GridMapEditor::GridMapEditor() { callable_mp(this, &GridMapEditor::_on_tool_mode_changed).unbind(1)); mode_buttons->add_child(select_mode_button); viewport_shortcut_buttons.push_back(select_mode_button); - select_mode_button->set_pressed(true); erase_mode_button = memnew(Button); erase_mode_button->set_theme_type_variation("FlatButton"); @@ -1724,6 +1723,10 @@ bool GridMapEditorPlugin::handles(Object *p_object) const { void GridMapEditorPlugin::make_visible(bool p_visible) { if (p_visible) { + BaseButton *button = grid_map_editor->mode_buttons_group->get_pressed_button(); + if (button == nullptr) { + grid_map_editor->select_mode_button->set_pressed(true); + } grid_map_editor->_on_tool_mode_changed(); panel_button->show(); EditorNode::get_bottom_panel()->make_item_visible(grid_map_editor);