Changeset - r12570:7e7470a9c171
[Not reviewed]
master
0 1 0
frosch - 15 years ago 2009-08-01 11:55:49
frosch@openttd.org
(svn r17020) -Fix: Recenter viewport of waypoint-gui after moving the sign.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/waypoint_cmd.cpp
Show inline comments
 
@@ -34,6 +34,8 @@ void Waypoint::UpdateVirtCoord()
 
	Point pt = RemapCoords2(TileX(this->xy) * TILE_SIZE, TileY(this->xy) * TILE_SIZE);
 
	SetDParam(0, this->index);
 
	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(TileInd
 
		} else if (!wp->IsInUse()) {
 
			/* Move existing (recently deleted) waypoint to the new location */
 
			wp->xy = start_tile;
 
			InvalidateWindowData(WC_WAYPOINT_VIEW, wp->index);
 
		}
 
		wp->owner = GetTileOwner(start_tile);
 

	
0 comments (0 inline, 0 general)