(svn r22135) -Fix [FS#4523]: When commands need to invalidate windows, process these events asynchronously before the next redraw. Calling window code directly from command scope uses wrong _current_company and might issue nested DoCommands() which interfer with the running command.
This commit is contained in:
@@ -518,7 +518,9 @@ void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index)
|
||||
WindowNumber wno = GetInspectWindowNumber(feature, index);
|
||||
DeleteWindowById(WC_NEWGRF_INSPECT, wno);
|
||||
|
||||
/* Reinitialise the land information window to remove the "debug" sprite if needed. */
|
||||
/* Reinitialise the land information window to remove the "debug" sprite if needed.
|
||||
* Note: Since we might be called from a command here, it is important to not execute
|
||||
* the invalidation immediatelly. The landinfo window tests commands itself. */
|
||||
InvalidateWindowData(WC_LAND_INFO, 0, 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user