summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: