Mercurial > hg > openttd
changeset 16117:4a2b464d3f87 draft
(svn r20813) -Fix: make the waypoint viewport keep centered around the waypoint when resizing the window (Krille)
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 16 Sep 2010 16:14:30 +0000 |
parents | 50a0ec38c886 |
children | d9663f636e0e |
files | src/waypoint_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -110,7 +110,7 @@ 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 @@ if (this->viewport != NULL) { NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT); nvp->UpdateViewportCoordinates(this); + this->wp->UpdateVirtCoord(); } }