summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-06 10:32:55 +0100
committerErich Eckner <git@eckner.net>2018-11-16 19:11:46 +0100
commitdd830647aad0083c5c9f1567e84b25455f82db3a (patch)
tree226015d24700598803311421430705a6894d4ad2 /src
parentf39883d9937654a06251d0eb4d47d33d6c0f28eb (diff)
downloadopenttd-dd830647aad0083c5c9f1567e84b25455f82db3a.tar.xz
only show layer switches for available layers
Diffstat (limited to 'src')
-rw-r--r--src/toolbar_gui.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}