summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-24 16:38:09 +0000
committerrubidium <rubidium@openttd.org>2011-08-24 16:38:09 +0000
commitf5dd74499bac7fc9a2cbc5abdc6527536fe303a1 (patch)
treef0c88597fcaebeaf4502025359bf0f47600318a0
parent49d8852f3f016f385ee3fabc5b5a714c70b5b2c8 (diff)
downloadopenttd-f5dd74499bac7fc9a2cbc5abdc6527536fe303a1.tar.xz
(svn r22829) -Codechange: unify the dirtying of windows after an AI scan
-rw-r--r--src/ai/ai_core.cpp4
-rw-r--r--src/console_cmds.cpp2
-rw-r--r--src/network/network_content_gui.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp
index f92d511c2..b98c88c30 100644
--- a/src/ai/ai_core.cpp
+++ b/src/ai/ai_core.cpp
@@ -334,4 +334,8 @@ void CcAI(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
{
AI::ai_scanner->RescanAIDir();
ResetConfig();
+
+ InvalidateWindowData(WC_AI_LIST, 0, 1);
+ SetWindowClassesDirty(WC_AI_DEBUG);
+ SetWindowDirty(WC_AI_SETTINGS, 0);
}
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index b5f8d2e47..d632d0280 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1253,8 +1253,6 @@ DEF_CONSOLE_CMD(ConRescanAI)
TarScanner::DoScan();
AI::Rescan();
- InvalidateWindowData(WC_AI_LIST, 0, 1);
- SetWindowDirty(WC_AI_SETTINGS, 0);
return true;
}
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 3e901116d..daebb83a2 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -94,8 +94,6 @@ public:
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: