summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index be0a0d4b4..138cb81bb 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -659,7 +659,7 @@ public:
this->BuildSortTownList();
this->InitNested(desc, 0);
- this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(TDW_CENTERTOWN)->current_y / (int)this->resize.step_height);
+ this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(TDW_CENTERTOWN)->current_y / this->resize.step_height);
}
~TownDirectoryWindow()
@@ -803,7 +803,7 @@ public:
virtual void OnResize(Point delta)
{
- this->vscroll.UpdateCapacity(delta.y / (int)this->resize.step_height);
+ this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(TDW_CENTERTOWN)->current_y / this->resize.step_height);
}
virtual void OnInvalidateData(int data)