summaryrefslogtreecommitdiff
path: root/src/waypoint_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-10-23 20:51:48 +0000
committeralberth <alberth@openttd.org>2010-10-23 20:51:48 +0000
commitdf7a32d36449c5d14e0bb3efa99379b460057305 (patch)
tree24d33a7a8270bc44e5e5b11cce9c3979d785f966 /src/waypoint_gui.cpp
parent83094e5e58f5674df04e204ba946315da25fad3c (diff)
downloadopenttd-df7a32d36449c5d14e0bb3efa99379b460057305.tar.xz
(svn r21021) -Add [FS#4171]: Center industry gui and waypoint gui after resize (partly by Krille).
Diffstat (limited to 'src/waypoint_gui.cpp')
-rw-r--r--src/waypoint_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index c6e84d21b..b05172468 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -127,6 +127,8 @@ public:
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT);
nvp->UpdateViewportCoordinates(this);
this->wp->UpdateVirtCoord();
+
+ ScrollWindowToTile(this->GetCenterTile(), this, true); // Re-center viewport.
}
}