mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
fix hidden gizmo at start-up
This commit is contained in:
parent
5efd124ca1
commit
f5871c18bf
@ -1351,7 +1351,6 @@ GridMapEditor::GridMapEditor() {
|
|||||||
callable_mp(this, &GridMapEditor::_on_tool_mode_changed).unbind(1));
|
callable_mp(this, &GridMapEditor::_on_tool_mode_changed).unbind(1));
|
||||||
mode_buttons->add_child(select_mode_button);
|
mode_buttons->add_child(select_mode_button);
|
||||||
viewport_shortcut_buttons.push_back(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 = memnew(Button);
|
||||||
erase_mode_button->set_theme_type_variation("FlatButton");
|
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) {
|
void GridMapEditorPlugin::make_visible(bool p_visible) {
|
||||||
if (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();
|
grid_map_editor->_on_tool_mode_changed();
|
||||||
panel_button->show();
|
panel_button->show();
|
||||||
EditorNode::get_bottom_panel()->make_item_visible(grid_map_editor);
|
EditorNode::get_bottom_panel()->make_item_visible(grid_map_editor);
|
||||||
|
Loading…
Reference in New Issue
Block a user