changeset 18020:fd8f44f55f2a draft

(svn r22829) -Codechange: unify the dirtying of windows after an AI scan
author rubidium <rubidium@openttd.org>
date Wed, 24 Aug 2011 16:38:09 +0000
parents 17be4c7991db
children c3d55b648534
files src/ai/ai_core.cpp src/console_cmds.cpp src/network/network_content_gui.cpp
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ai/ai_core.cpp
+++ b/src/ai/ai_core.cpp
@@ -334,4 +334,8 @@
 {
 	AI::ai_scanner->RescanAIDir();
 	ResetConfig();
+
+	InvalidateWindowData(WC_AI_LIST, 0, 1);
+	SetWindowClassesDirty(WC_AI_DEBUG);
+	SetWindowDirty(WC_AI_SETTINGS, 0);
 }
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1253,8 +1253,6 @@
 
 	TarScanner::DoScan();
 	AI::Rescan();
-	InvalidateWindowData(WC_AI_LIST, 0, 1);
-	SetWindowDirty(WC_AI_SETTINGS, 0);
 
 	return true;
 }
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -94,8 +94,6 @@
 				case CONTENT_TYPE_AI:
 				case CONTENT_TYPE_AI_LIBRARY:
 					AI::Rescan();
-					SetWindowClassesDirty(WC_AI_DEBUG);
-					InvalidateWindowData(WC_AI_LIST, 0, 1);
 					break;
 
 				case CONTENT_TYPE_BASE_GRAPHICS: