mirror of https://github.com/OpenTTD/OpenTTD
(svn r25384) -Fix (25344): Correctly invalidate the story window when data changes
parent
be8645e137
commit
78b6e79c01
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue