(svn r14143) -Codechange: Recenter viewport of waypoint window when relocating the waypoint.

pull/155/head
frosch 16 years ago
parent bb85d482d8
commit 6b9b879a2c

@ -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;

@ -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)) {

Loading…
Cancel
Save