mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-23 18:37:19 +02:00
Merge pull request #2975 from Ryex/fix/version-page-load-speed
fix: don't hang the ui for a full version load
This commit is contained in:
commit
9fe81ff564
@ -222,11 +222,12 @@ bool Component::isMoveable()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Component::isVersionChangeable()
|
||||
bool Component::isVersionChangeable(bool wait)
|
||||
{
|
||||
auto list = getVersionList();
|
||||
if (list) {
|
||||
list->waitToLoad();
|
||||
if (wait)
|
||||
list->waitToLoad();
|
||||
return list->count() != 0;
|
||||
}
|
||||
return false;
|
||||
|
@ -72,7 +72,7 @@ class Component : public QObject, public ProblemProvider {
|
||||
bool isRevertible();
|
||||
bool isRemovable();
|
||||
bool isCustom();
|
||||
bool isVersionChangeable();
|
||||
bool isVersionChangeable(bool wait = true);
|
||||
bool isKnownModloader();
|
||||
QStringList knownConflictingComponents();
|
||||
|
||||
|
@ -243,7 +243,7 @@ void VersionPage::updateButtons(int row)
|
||||
ui->actionRemove->setEnabled(patch && patch->isRemovable());
|
||||
ui->actionMove_down->setEnabled(patch && patch->isMoveable());
|
||||
ui->actionMove_up->setEnabled(patch && patch->isMoveable());
|
||||
ui->actionChange_version->setEnabled(patch && patch->isVersionChangeable());
|
||||
ui->actionChange_version->setEnabled(patch && patch->isVersionChangeable(false));
|
||||
ui->actionEdit->setEnabled(patch && patch->isCustom());
|
||||
ui->actionCustomize->setEnabled(patch && patch->isCustomizable());
|
||||
ui->actionRevert->setEnabled(patch && patch->isRevertible());
|
||||
|
Loading…
x
Reference in New Issue
Block a user