From dd830647aad0083c5c9f1567e84b25455f82db3a Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 6 Nov 2018 10:32:55 +0100 Subject: only show layer switches for available layers --- src/toolbar_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/toolbar_gui.cpp') diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index b9b2fbd31..2d6f768be 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -1020,7 +1020,7 @@ static CallBackFunction MenuClickUnderground(int index) static CallBackFunction ToolbarUndergroundClick(Window *w) { - PopupMainToolbMenu(w, WID_TN_UNDERGROUND, STR_LANDSCAPING_MENU_UNDERGROUND, 5); + PopupMainToolbMenu(w, WID_TN_UNDERGROUND, STR_LANDSCAPING_MENU_UNDERGROUND, 1+LayerCount()); if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); return CBF_NONE; } -- cgit v1.2.3-70-g09d2