rework: make the filter as a tabbed widget in the dialog itself
Still needs a clear indication that the filter only applies after you click the search button...
This commit is contained in:
@@ -67,25 +67,6 @@ auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString min
|
||||
return ver.mcVersion.contains(mineVer);
|
||||
}
|
||||
|
||||
// We override this so that it refreshes correctly, otherwise it would show
|
||||
// invalid mods on the mod list, because the API would return mods for the
|
||||
// wrong mod loader :(
|
||||
void FlameModPage::filterMods()
|
||||
{
|
||||
auto ret = filter_dialog.execWithInstance(static_cast<MinecraftInstance*>(m_instance));
|
||||
m_filter = filter_dialog.getFilter();
|
||||
|
||||
if(ret == QDialog::DialogCode::Accepted){
|
||||
// CF API can't handle well this
|
||||
if(!m_filter->versions.empty())
|
||||
listModel->refresh();
|
||||
|
||||
int prev_count = ui->versionSelectionBox->count();
|
||||
ui->versionSelectionBox->clear();
|
||||
updateModVersions(prev_count);
|
||||
}
|
||||
}
|
||||
|
||||
// I don't know why, but doing this on the parent class makes it so that
|
||||
// other mod providers start loading before being selected, at least with
|
||||
// my Qt, so we need to implement this in every derived class...
|
||||
|
||||
Reference in New Issue
Block a user