summaryrefslogtreecommitdiff
path: root/src/terraform_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r--src/terraform_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 00d611e27..b288f383d 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -163,7 +163,7 @@ struct TerraformToolbarWindow : Window {
{
/* Don't show the place object button when there are no objects to place. */
NWidgetStacked *show_object = this->GetWidget<NWidgetStacked>(WID_TT_SHOW_PLACE_OBJECT);
- show_object->SetDisplayedPlane(ObjectClass::GetClassCount() != 0 ? 0 : SZSP_NONE);
+ show_object->SetDisplayedPlane(ObjectClass::GetUIClassCount() != 0 ? 0 : SZSP_NONE);
}
virtual void OnClick(Point pt, int widget, int click_count)
@@ -209,7 +209,7 @@ struct TerraformToolbarWindow : Window {
case WID_TT_PLACE_OBJECT: // Place object button
/* Don't show the place object button when there are no objects to place. */
- if (ObjectClass::GetClassCount() == 0) return;
+ if (ObjectClass::GetUIClassCount() == 0) return;
if (HandlePlacePushButton(this, WID_TT_PLACE_OBJECT, SPR_CURSOR_TRANSMITTER, HT_RECT)) {
ShowBuildObjectPicker(this);
this->last_user_action = widget;