Changeset - r20371:7a97f04b5eb5
[Not reviewed]
master
0 1 0
zuu - 11 years ago 2013-06-09 16:18:58
zuu@openttd.org
(svn r25384) -Fix (25344): Correctly invalidate the story window when data changes
1 file changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/story.cpp
Show inline comments
 
@@ -125,7 +125,7 @@ CommandCost CmdCreateStoryPage(TileIndex
 
			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(Ti
 
		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(Ti
 

	
 
	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(TileInd
 
			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
 

	
 
		delete p;
 

	
 
		InvalidateWindowData(WC_STORY_BOOK, -1);
 
		InvalidateWindowClassesData(WC_STORY_BOOK, -1);
 
	}
 

	
 
	return CommandCost();
0 comments (0 inline, 0 general)