From 4e74a4c5ccf8a1d6418252fd9f7f6df2156e8dca Mon Sep 17 00:00:00 2001 From: zuu Date: Fri, 13 Sep 2013 12:45:25 +0000 Subject: (svn r25761) -Change: Disable story/goal buttons when there is no content to show instead of when there is zero companies --- src/company_cmd.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/company_cmd.cpp') diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 101248481..0357e337e 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -34,6 +34,8 @@ #include "vehicle_func.h" #include "smallmap_gui.h" #include "game/game.hpp" +#include "goal_base.h" +#include "story_base.h" #include "table/strings.h" @@ -934,6 +936,8 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 AI::BroadcastNewEvent(new ScriptEventCompanyBankrupt(c_index)); Game::NewEvent(new ScriptEventCompanyBankrupt(c_index)); CompanyAdminRemove(c_index, (CompanyRemoveReason)reason); + + if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0); break; } -- cgit v1.2.3-54-g00ecf