# HG changeset patch # User rubidium # Date 2010-09-16 16:14:30 # Node ID 0e7cd852debf543d13c6dc2d0636530da4a9f871 # Parent 3b1391a37ef4daf3424ba1a78711af3acc3a27cc (svn r20813) -Fix: make the waypoint viewport keep centered around the waypoint when resizing the window (Krille) diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp --- 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(); } }