From 7a88433228faeb858e7e53a86a237c61e3d4eea1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 16 Sep 2010 16:14:30 +0000 Subject: (svn r20813) -Fix: make the waypoint viewport keep centered around the waypoint when resizing the window (Krille) --- src/waypoint_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/waypoint_gui.cpp') 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(WAYPVW_VIEWPORT); nvp->UpdateViewportCoordinates(this); + this->wp->UpdateVirtCoord(); } } -- cgit v1.2.3-54-g00ecf