void MinecraftVersionDialog::Refilter()
{
	visibleIndexes.clear();
	MCVersionList & verList = MCVersionList::Instance();
	for(unsigned i = 0; i < verList.size(); i++ )
	{
		const MCVersion & ver = verList[i];
		VersionType type = ver.GetVersionType();
		if(type == OldSnapshot && showOldSnapshots
			|| type == MCRewind && showMCRewind
			|| type != OldSnapshot && type != MCRewind)
			visibleIndexes.push_back(i);
	}
	
	listCtrl->SetItemCount(visibleIndexes.size());
	// we can use that value because the indexes do correspond up to the current stable version
	listCtrl->SetItemState(verList.GetStableVersionIndex(),wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
	listCtrl->SetColumnWidth(1,typeColumnWidth);
	SetupColumnSizes();
	listCtrl->Refresh();
	listCtrl->Update();
	OnSelectionChange();
}
Beispiel #2
0
int ListSelectDialog::ShowModal()
{
	LoadList();
	SetupColumnSizes();
	return wxDialog::ShowModal();
}