diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-08-11 10:43:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 10:43:07 +0200 |
commit | c231bda5207249fb7ccbc6e7b8b92595718ca985 (patch) | |
tree | 8bc753f714af4389644472fe1ede17d5d16efc1c | |
parent | 066fb4d5f9417afffac27a0eb8690f1301cad382 (diff) | |
parent | e4a9233a83a78d9296651f5e07a97070f7932c57 (diff) |
Merge pull request #10240 from djrm/pr_hidden_tilemap_menu
Hide tilemap menu when no tilemap is selected
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index a52a875338..023424d891 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -49,6 +49,8 @@ void TileMapEditor::_notification(int p_what) { rotate_180->set_icon(get_icon("Rotate180", "EditorIcons")); rotate_270->set_icon(get_icon("Rotate270", "EditorIcons")); + search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons")); + } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { @@ -1487,6 +1489,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { toolbar = memnew(HBoxContainer); toolbar->set_h_size_flags(SIZE_EXPAND_FILL); toolbar->set_alignment(BoxContainer::ALIGN_END); + toolbar->hide(); CanvasItemEditor::get_singleton()->add_control_to_menu_panel(toolbar); // Tile position @@ -1512,8 +1515,6 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { toolbar->add_child(options); - toolbar->add_child(memnew(VSeparator)); - transp = memnew(ToolButton); transp->set_toggle_mode(true); transp->set_tooltip(TTR("Transpose") + " (" + ED_GET_SHORTCUT("tile_map_editor/transpose")->get_as_text() + ")"); |