(svn r14143) -Codechange: Recenter viewport of waypoint window when relocating the waypoint.
--- a/src/waypoint.cpp Sat Aug 23 16:26:01 2008 +0000
+++ b/src/waypoint.cpp Sat Aug 23 16:34:05 2008 +0000
@@ -249,6 +249,7 @@
RedrawWaypointSign(wp);
wp->xy = tile;
+ InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
}
const StationSpec* statspec;
--- a/src/waypoint_gui.cpp Sat Aug 23 16:26:01 2008 +0000
+++ b/src/waypoint_gui.cpp Sat Aug 23 16:34:05 2008 +0000
@@ -77,6 +77,13 @@
}
}
+ virtual void OnInvalidateData(int data)
+ {
+ int x = TileX(this->wp->xy) * TILE_SIZE;
+ int y = TileY(this->wp->xy) * TILE_SIZE;
+ ScrollWindowTo(x,y, this);
+ }
+
virtual void OnQueryTextFinished(char *str)
{
if (!StrEmpty(str)) {