summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-19 15:20:15 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-19 15:20:15 -0600
commitd6ec81af775848ebbb212927588693b8d51d83af (patch)
tree99b54a6e2b8cc7ad2b05aa39aa480ab8838602ec /modules
parent918faec2393b43e7b551e14add36edde973d2bee (diff)
parentf5871c18bfbf41dbf5c20a7943c5bdd40cc020c3 (diff)
downloadredot-engine-d6ec81af775848ebbb212927588693b8d51d83af.tar.gz
Merge pull request #99354 from Nodragem/fix-hidden-gizmo-at-startup
GridMap: Fix hidden gizmo at start-up
Diffstat (limited to 'modules')
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index 99e3b02dea..0d522a0562 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);