diff options
Diffstat (limited to 'modules/gridmap')
-rw-r--r-- | modules/gridmap/editor/grid_map_editor_plugin.cpp | 13 | ||||
-rw-r--r-- | modules/gridmap/editor/grid_map_editor_plugin.h | 1 |
2 files changed, 4 insertions, 10 deletions
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index 17f9832096..b0f73a98c9 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -1011,13 +1011,6 @@ void GridMapEditor::_draw_grids(const Vector3 &cell_size) { } } -void GridMapEditor::_update_theme() { - options->set_icon(get_theme_icon(SNAME("GridMap"), SNAME("EditorIcons"))); - search_box->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons"))); - mode_thumbnail->set_icon(get_theme_icon(SNAME("FileThumbnail"), SNAME("EditorIcons"))); - mode_list->set_icon(get_theme_icon(SNAME("FileList"), SNAME("EditorIcons"))); -} - void GridMapEditor::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { @@ -1038,7 +1031,6 @@ void GridMapEditor::_notification(int p_what) { _update_selection_transform(); _update_paste_indicator(); - _update_theme(); } break; case NOTIFICATION_EXIT_TREE: { @@ -1079,7 +1071,10 @@ void GridMapEditor::_notification(int p_what) { } break; case NOTIFICATION_THEME_CHANGED: { - _update_theme(); + options->set_icon(get_theme_icon(SNAME("GridMap"), SNAME("EditorIcons"))); + search_box->set_right_icon(get_theme_icon(SNAME("Search"), SNAME("EditorIcons"))); + mode_thumbnail->set_icon(get_theme_icon(SNAME("FileThumbnail"), SNAME("EditorIcons"))); + mode_list->set_icon(get_theme_icon(SNAME("FileList"), SNAME("EditorIcons"))); } break; case NOTIFICATION_APPLICATION_FOCUS_OUT: { diff --git a/modules/gridmap/editor/grid_map_editor_plugin.h b/modules/gridmap/editor/grid_map_editor_plugin.h index a64dc4a80b..773bf4b6a4 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.h +++ b/modules/gridmap/editor/grid_map_editor_plugin.h @@ -193,7 +193,6 @@ class GridMapEditor : public VBoxContainer { void _item_selected_cbk(int idx); void _update_cursor_transform(); void _update_cursor_instance(); - void _update_theme(); void _text_changed(const String &p_text); void _sbox_input(const Ref<InputEvent> &p_ie); |