diff options
author | zuu <zuu@openttd.org> | 2013-06-09 16:18:58 +0000 |
---|---|---|
committer | zuu <zuu@openttd.org> | 2013-06-09 16:18:58 +0000 |
commit | 78b6e79c011e621980857764d3b9445028cf592f (patch) | |
tree | e6dc69c7bf8719e4fbcee08e6c6268dfe02d7a96 | |
parent | be8645e13764d43a85f3f101897b74fa1545d359 (diff) | |
download | openttd-78b6e79c011e621980857764d3b9445028cf592f.tar.xz |
(svn r25384) -Fix (25344): Correctly invalidate the story window when data changes
-rw-r--r-- | src/story.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/story.cpp b/src/story.cpp index 4e0492376..915f44da5 100644 --- a/src/story.cpp +++ b/src/story.cpp @@ -125,7 +125,7 @@ CommandCost CmdCreateStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u s->title = strdup(text); } - InvalidateWindowData(WC_STORY_BOOK, -1); + InvalidateWindowClassesData(WC_STORY_BOOK, -1); _new_story_page_id = s->index; _story_page_next_sort_value++; @@ -176,7 +176,7 @@ CommandCost CmdCreateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3 pe->page = page_id; UpdateElement(*pe, tile, p2, text); - InvalidateWindowData(WC_STORY_BOOK, page_id); + InvalidateWindowClassesData(WC_STORY_BOOK, page_id); _new_story_page_element_id = pe->index; _story_page_element_next_sort_value++; @@ -211,7 +211,7 @@ CommandCost CmdUpdateStoryPageElement(TileIndex tile, DoCommandFlag flags, uint3 if (flags & DC_EXEC) { UpdateElement(*pe, tile, p2, text); - InvalidateWindowData(WC_STORY_BOOK, pe->page); + InvalidateWindowClassesData(WC_STORY_BOOK, pe->page); } return CommandCost(); @@ -241,7 +241,7 @@ CommandCost CmdSetStoryPageTitle(TileIndex tile, DoCommandFlag flags, uint32 p1, p->title = strdup(text); } - InvalidateWindowData(WC_STORY_BOOK, page_id); + InvalidateWindowClassesData(WC_STORY_BOOK, page_id); } return CommandCost(); @@ -296,7 +296,7 @@ CommandCost CmdRemoveStoryPage(TileIndex tile, DoCommandFlag flags, uint32 p1, u delete p; - InvalidateWindowData(WC_STORY_BOOK, -1); + InvalidateWindowClassesData(WC_STORY_BOOK, -1); } return CommandCost(); |