mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r21246) -Fix: upon rescanning AIs the new AIs would (after some time) show up in the AI list but you could not select all
This commit is contained in:
parent
94c45d9cc3
commit
c7f0518f16
|
@ -187,6 +187,11 @@ struct AIListWindow : public Window {
|
||||||
this->vscroll->SetCapacity(nwi->current_y / this->line_height);
|
this->vscroll->SetCapacity(nwi->current_y / this->line_height);
|
||||||
nwi->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
|
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. */
|
/** Widgets for the AI list window. */
|
||||||
|
|
|
@ -1158,6 +1158,7 @@ DEF_CONSOLE_CMD(ConRescanAI)
|
||||||
}
|
}
|
||||||
|
|
||||||
AI::Rescan();
|
AI::Rescan();
|
||||||
|
InvalidateWindowData(WC_AI_LIST, 0, 1);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,7 @@ public:
|
||||||
case CONTENT_TYPE_AI_LIBRARY:
|
case CONTENT_TYPE_AI_LIBRARY:
|
||||||
AI::Rescan();
|
AI::Rescan();
|
||||||
SetWindowClassesDirty(WC_AI_DEBUG);
|
SetWindowClassesDirty(WC_AI_DEBUG);
|
||||||
|
InvalidateWindowData(WC_AI_LIST, 0, 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CONTENT_TYPE_BASE_GRAPHICS:
|
case CONTENT_TYPE_BASE_GRAPHICS:
|
||||||
|
|
Loading…
Reference in New Issue