diff --git a/src/waypoint.cpp b/src/waypoint.cpp --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -249,6 +249,7 @@ CommandCost CmdBuildTrainWaypoint(TileIn RedrawWaypointSign(wp); wp->xy = tile; + InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index); } const StationSpec* statspec; diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -77,6 +77,13 @@ public: } } + 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)) {