summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ai/ai_gui.cpp5
-rw-r--r--src/console_cmds.cpp1
-rw-r--r--src/network/network_content_gui.cpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index b956582d4..a29c169eb 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -187,6 +187,11 @@ struct AIListWindow : public Window {
this->vscroll->SetCapacity(nwi->current_y / this->line_height);
nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
+
+ virtual void OnInvalidateData(int data)
+ {
+ this->vscroll->SetCount((int)this->ai_info_list->size() + 1);
+ }
};
/** Widgets for the AI list window. */
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 89680fde5..f29e315e0 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -1158,6 +1158,7 @@ DEF_CONSOLE_CMD(ConRescanAI)
}
AI::Rescan();
+ InvalidateWindowData(WC_AI_LIST, 0, 1);
return true;
}
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index be99a338b..b48781ea0 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -94,6 +94,7 @@ public:
case CONTENT_TYPE_AI_LIBRARY:
AI::Rescan();
SetWindowClassesDirty(WC_AI_DEBUG);
+ InvalidateWindowData(WC_AI_LIST, 0, 1);
break;
case CONTENT_TYPE_BASE_GRAPHICS: