mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-23 20:36:47 +01:00
(svn r17020) -Fix: Recenter viewport of waypoint-gui after moving the sign.
This commit is contained in:
parent
b4abe942cb
commit
1cd07265f8
@ -34,6 +34,8 @@ void Waypoint::UpdateVirtCoord()
|
|||||||
Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
|
Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
|
||||||
SetDParam(0, this->index);
|
SetDParam(0, this->index);
|
||||||
this->sign.UpdatePosition(pt.x, pt.y - 0x20, STR_WAYPOINT_VIEWPORT);
|
this->sign.UpdatePosition(pt.x, pt.y - 0x20, STR_WAYPOINT_VIEWPORT);
|
||||||
|
/* Recenter viewport */
|
||||||
|
InvalidateWindowData(WC_WAYPOINT_VIEW, this->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -270,7 +272,6 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
|
|||||||
} else if (!wp->IsInUse()) {
|
} else if (!wp->IsInUse()) {
|
||||||
/* Move existing (recently deleted) waypoint to the new location */
|
/* Move existing (recently deleted) waypoint to the new location */
|
||||||
wp->xy = start_tile;
|
wp->xy = start_tile;
|
||||||
InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
|
|
||||||
}
|
}
|
||||||
wp->owner = GetTileOwner(start_tile);
|
wp->owner = GetTileOwner(start_tile);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user