(svn r22134) -Codechange: Move ReInit() of the landinfo window from DeleteNewGRFInspectWindow() into a InvalidateData call.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
frosch 14 years ago
parent 1a3a1e3b0c
commit 40cc3324fa

@ -330,6 +330,16 @@ public:
{
::ShowNewGRFInspectWindow(GetGrfSpecFeature(this->tile), this->tile);
}
virtual void OnInvalidateData(int data)
{
switch (data) {
case 1:
/* ReInit, "debug" sprite might have changed */
this->ReInit();
break;
}
}
};
/**

@ -519,8 +519,7 @@ void DeleteNewGRFInspectWindow(GrfSpecFeature feature, uint index)
DeleteWindowById(WC_NEWGRF_INSPECT, wno);
/* Reinitialise the land information window to remove the "debug" sprite if needed. */
Window *w = FindWindowById(WC_LAND_INFO, 0);
if (w != NULL) w->ReInit();
InvalidateWindowData(WC_LAND_INFO, 0, 1);
}
/**

Loading…
Cancel
Save