summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-09-16 16:14:30 +0000
committerrubidium <rubidium@openttd.org>2010-09-16 16:14:30 +0000
commit7a88433228faeb858e7e53a86a237c61e3d4eea1 (patch)
treeda8842d7280b577cc7be36c7ffb96a7c2ef4d508 /src
parent15212cf9485dcc0374347cb93813d549ea089082 (diff)
downloadopenttd-7a88433228faeb858e7e53a86a237c61e3d4eea1.tar.xz
(svn r20813) -Fix: make the waypoint viewport keep centered around the waypoint when resizing the window (Krille)
Diffstat (limited to 'src')
-rw-r--r--src/waypoint_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index f6965eb98..71c96b7fb 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -110,7 +110,7 @@ public:
int x = TileX(this->wp->xy) * TILE_SIZE;
int y = TileY(this->wp->xy) * TILE_SIZE;
- ScrollWindowTo(x, y, -1, this);
+ ScrollWindowTo(x, y, -1, this, true);
}
virtual void OnResize()
@@ -118,6 +118,7 @@ public:
if (this->viewport != NULL) {
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT);
nvp->UpdateViewportCoordinates(this);
+ this->wp->UpdateVirtCoord();
}
}