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/goal.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/goal.cpp') diff --git a/src/goal.cpp b/src/goal.cpp index 2f55be5de..2bd74b9c8 100644 --- a/src/goal.cpp +++ b/src/goal.cpp @@ -85,6 +85,7 @@ CommandCost CmdCreateGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 g->completed = false; InvalidateWindowData(WC_GOALS_LIST, 0); + if (Goal::GetNumItems() == 1) InvalidateWindowData(WC_MAIN_TOOLBAR, 0); _new_goal_id = g->index; } @@ -111,6 +112,7 @@ CommandCost CmdRemoveGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 delete g; InvalidateWindowData(WC_GOALS_LIST, 0); + if (Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0); } return CommandCost(); -- cgit v1.2.3-54-g00ecf