Hide tilemap menu when no tilemap is selected
(cherry picked from commit e4a9233a83
)
This commit is contained in:
parent
e59bb87fb6
commit
a362270112
1 changed files with 3 additions and 2 deletions
|
@ -51,6 +51,8 @@ void TileMapEditor::_notification(int p_what) {
|
||||||
rotate_180->set_icon(get_icon("Rotate180", "EditorIcons"));
|
rotate_180->set_icon(get_icon("Rotate180", "EditorIcons"));
|
||||||
rotate_270->set_icon(get_icon("Rotate270", "EditorIcons"));
|
rotate_270->set_icon(get_icon("Rotate270", "EditorIcons"));
|
||||||
|
|
||||||
|
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||||
|
@ -1503,6 +1505,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
|
||||||
toolbar = memnew(HBoxContainer);
|
toolbar = memnew(HBoxContainer);
|
||||||
toolbar->set_h_size_flags(SIZE_EXPAND_FILL);
|
toolbar->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
toolbar->set_alignment(BoxContainer::ALIGN_END);
|
toolbar->set_alignment(BoxContainer::ALIGN_END);
|
||||||
|
toolbar->hide();
|
||||||
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(toolbar);
|
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(toolbar);
|
||||||
|
|
||||||
// Tile position
|
// Tile position
|
||||||
|
@ -1528,8 +1531,6 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
|
||||||
|
|
||||||
toolbar->add_child(options);
|
toolbar->add_child(options);
|
||||||
|
|
||||||
toolbar->add_child(memnew(VSeparator));
|
|
||||||
|
|
||||||
transp = memnew(ToolButton);
|
transp = memnew(ToolButton);
|
||||||
transp->set_toggle_mode(true);
|
transp->set_toggle_mode(true);
|
||||||
transp->set_tooltip(TTR("Transpose") + " (" + ED_GET_SHORTCUT("tile_map_editor/transpose")->get_as_text() + ")");
|
transp->set_tooltip(TTR("Transpose") + " (" + ED_GET_SHORTCUT("tile_map_editor/transpose")->get_as_text() + ")");
|
||||||
|
|
Loading…
Reference in a new issue