From 78b6e79c011e621980857764d3b9445028cf592f Mon Sep 17 00:00:00 2001 From: zuu Date: Sun, 9 Jun 2013 16:18:58 +0000 Subject: (svn r25384) -Fix (25344): Correctly invalidate the story window when data changes --- src/story.cpp | 10 +++++----- 1 file 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(); -- cgit v1.2.3-70-g09d2