mirror of https://github.com/OpenTTD/OpenTTD
(svn r19615) -Fix [FS#3763]: Company related graphs weren't updated correctly after changing the company colour.
parent
0ef33548c2
commit
7ba4f98ce5
|
@ -969,6 +969,13 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||||
ResetVehicleColourMap();
|
ResetVehicleColourMap();
|
||||||
MarkWholeScreenDirty();
|
MarkWholeScreenDirty();
|
||||||
|
|
||||||
|
/* All graph related to companies use the company colour. */
|
||||||
|
InvalidateWindowData(WC_INCOME_GRAPH, 0);
|
||||||
|
InvalidateWindowData(WC_OPERATING_PROFIT, 0);
|
||||||
|
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
||||||
|
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
|
||||||
|
InvalidateWindowData(WC_COMPANY_VALUE, 0);
|
||||||
|
|
||||||
/* Company colour data is indirectly cached. */
|
/* Company colour data is indirectly cached. */
|
||||||
Vehicle *v;
|
Vehicle *v;
|
||||||
FOR_ALL_VEHICLES(v) {
|
FOR_ALL_VEHICLES(v) {
|
||||||
|
|
|
@ -528,7 +528,7 @@ public:
|
||||||
|
|
||||||
virtual void OnInvalidateData(int data)
|
virtual void OnInvalidateData(int data)
|
||||||
{
|
{
|
||||||
this->OnTick();
|
this->UpdateStatistics(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue