diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2018-02-25 23:04:16 +0700 |
---|---|---|
committer | Poommetee Ketson <poommetee@protonmail.com> | 2018-02-25 23:04:16 +0700 |
commit | 2de1dfa42f821fcbc140d8ae8907c060135c584b (patch) | |
tree | cd725829b00009f6df3138458eeb7a3ae6485984 /editor/plugins/tile_map_editor_plugin.cpp | |
parent | 08584b7e2215c852b80dc143cf712ccc73f9cacb (diff) | |
download | redot-engine-2de1dfa42f821fcbc140d8ae8907c060135c584b.tar.gz |
Update icons when theme changed
Diffstat (limited to 'editor/plugins/tile_map_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index c97e949403..8198d2422d 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -48,6 +48,20 @@ void TileMapEditor::_notification(int p_what) { } break; + case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { + + bool new_show_tile_info = EditorSettings::get_singleton()->get("editors/tile_map/show_tile_info_on_hover"); + if (new_show_tile_info != show_tile_info) { + show_tile_info = new_show_tile_info; + tile_info->set_visible(show_tile_info); + } + + if (is_visible_in_tree()) { + _update_palette(); + } + + } // fallthrough + case NOTIFICATION_ENTER_TREE: { transp->set_icon(get_icon("Transpose", "EditorIcons")); @@ -61,19 +75,6 @@ void TileMapEditor::_notification(int p_what) { search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons")); } break; - - case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - - bool new_show_tile_info = EditorSettings::get_singleton()->get("editors/tile_map/show_tile_info_on_hover"); - if (new_show_tile_info != show_tile_info) { - show_tile_info = new_show_tile_info; - tile_info->set_visible(show_tile_info); - } - - if (is_visible_in_tree()) { - _update_palette(); - } - } break; } } |