summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-10-23 21:14:35 +0000
committeralberth <alberth@openttd.org>2010-10-23 21:14:35 +0000
commitc4687de4e263b72c66fd290c83d4fdee9dd54593 (patch)
treefac6fdbd78a8cf3b397e5bf80e83bf11aa7dca95 /src
parentdf7a32d36449c5d14e0bb3efa99379b460057305 (diff)
downloadopenttd-c4687de4e263b72c66fd290c83d4fdee9dd54593.tar.xz
(svn r21022) -Add (r21021): Missed recentering of a town gui viewport after a resize.
Diffstat (limited to 'src')
-rw-r--r--src/town_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 1cd7c3193..35544cd2e 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -526,6 +526,8 @@ public:
if (this->viewport != NULL) {
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(TVW_VIEWPORT);
nvp->UpdateViewportCoordinates(this);
+
+ ScrollWindowToTile(this->town->xy, this, true); // Re-center viewport.
}
}