diff options
author | Patric Stout <truebrain@openttd.org> | 2021-01-08 22:34:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 22:34:21 +0100 |
commit | 5f591c86fe0d49f18da12515facc884269497b08 (patch) | |
tree | e9da61f34e66fe53e78eb1bcc318c9ca6fc4191b /src | |
parent | 31d19680043cecaaca31dba3fee341699db1b7a3 (diff) | |
download | openttd-5f591c86fe0d49f18da12515facc884269497b08.tar.xz |
Fix 85a49a0d: invalidate airport toolbar when new planes become available (#8532)
Otherwise if the airport button is disabled, it will remain disabled
until you close/open the toolbar again.
Diffstat (limited to 'src')
-rw-r--r-- | src/engine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 2681b8fa6..e73fdb058 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -735,6 +735,7 @@ static void EnableEngineForCompany(EngineID eid, CompanyID company) InvalidateWindowData(WC_MAIN_TOOLBAR, 0); 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_AIRCRAFT) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_AIR); } } @@ -1018,6 +1019,7 @@ static void NewVehicleAvailable(Engine *e) /* Update the toolbar. */ 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_AIRCRAFT) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_AIR); /* Close pending preview windows */ DeleteWindowById(WC_ENGINE_PREVIEW, index); |