Otherwise if the airport button is disabled, it will remain disabled until you close/open the toolbar again.
This commit is contained in:
@@ -735,6 +735,7 @@ static void EnableEngineForCompany(EngineID eid, CompanyID company)
|
|||||||
InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
|
InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
|
||||||
if (e->type == VEH_ROAD) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_ROAD);
|
if (e->type == VEH_ROAD) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_ROAD);
|
||||||
if (e->type == VEH_SHIP) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_WATER);
|
if (e->type == VEH_SHIP) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_WATER);
|
||||||
|
if (e->type == VEH_AIRCRAFT) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_AIR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1018,6 +1019,7 @@ static void NewVehicleAvailable(Engine *e)
|
|||||||
/* Update the toolbar. */
|
/* Update the toolbar. */
|
||||||
if (e->type == VEH_ROAD) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_ROAD);
|
if (e->type == VEH_ROAD) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_ROAD);
|
||||||
if (e->type == VEH_SHIP) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_WATER);
|
if (e->type == VEH_SHIP) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_WATER);
|
||||||
|
if (e->type == VEH_AIRCRAFT) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_AIR);
|
||||||
|
|
||||||
/* Close pending preview windows */
|
/* Close pending preview windows */
|
||||||
DeleteWindowById(WC_ENGINE_PREVIEW, index);
|
DeleteWindowById(WC_ENGINE_PREVIEW, index);
|
||||||
|
Reference in New Issue
Block a user