From e4a9233a83a78d9296651f5e07a97070f7932c57 Mon Sep 17 00:00:00 2001 From: "Daniel J. Ramirez" Date: Thu, 10 Aug 2017 14:48:48 -0500 Subject: Hide tilemap menu when no tilemap is selected --- editor/plugins/tile_map_editor_plugin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'editor/plugins') 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() + ")"); -- cgit v1.2.3