diff options
author | zuu <zuu@openttd.org> | 2013-09-13 12:45:25 +0000 |
---|---|---|
committer | zuu <zuu@openttd.org> | 2013-09-13 12:45:25 +0000 |
commit | 4e74a4c5ccf8a1d6418252fd9f7f6df2156e8dca (patch) | |
tree | 6cf46c6e06f0ab4972eb3e78df4cf4e5bc59ac7d /src/story.cpp | |
parent | 6516afae504fcadb23f9024f09be5168e29153ee (diff) | |
download | openttd-4e74a4c5ccf8a1d6418252fd9f7f6df2156e8dca.tar.xz |
(svn r25761) -Change: Disable story/goal buttons when there is no content to show instead of when there is zero companies
Diffstat (limited to 'src/story.cpp')
-rw-r--r-- | src/story.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/story.cpp b/src/story.cpp index b85ce20ac..e60eaadec 100644 --- a/src/story.cpp +++ b/src/story.cpp @@ -128,6 +128,7 @@ CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u } InvalidateWindowClassesData(WC_STORY_BOOK, -1); + if (StoryPage::GetNumItems() == 1) InvalidateWindowData(WC_MAIN_TOOLBAR, 0); _new_story_page_id = s->index; _story_page_next_sort_value++; @@ -300,6 +301,7 @@ CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u delete p; InvalidateWindowClassesData(WC_STORY_BOOK, -1); + if (StoryPage::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0); } return CommandCost(); |