diff --git a/src/waypoint.cpp b/src/waypoint.cpp index 1fa291b399..aaaedd73e2 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -249,6 +249,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint3 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 index 75d9d47981..f1a1c23c1e 100644 --- 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)) {