fix don't hang the ui for a full version load
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> (cherry picked from commit 7bd04ae928527b065174021fba98dc78d0d119a3)
This commit is contained in:
parent
80d675d2e6
commit
729cec5f45
@ -222,11 +222,12 @@ bool Component::isMoveable()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Component::isVersionChangeable()
|
bool Component::isVersionChangeable(bool wait)
|
||||||
{
|
{
|
||||||
auto list = getVersionList();
|
auto list = getVersionList();
|
||||||
if (list) {
|
if (list) {
|
||||||
list->waitToLoad();
|
if (wait)
|
||||||
|
list->waitToLoad();
|
||||||
return list->count() != 0;
|
return list->count() != 0;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -72,7 +72,7 @@ class Component : public QObject, public ProblemProvider {
|
|||||||
bool isRevertible();
|
bool isRevertible();
|
||||||
bool isRemovable();
|
bool isRemovable();
|
||||||
bool isCustom();
|
bool isCustom();
|
||||||
bool isVersionChangeable();
|
bool isVersionChangeable(bool wait = true);
|
||||||
bool isKnownModloader();
|
bool isKnownModloader();
|
||||||
QStringList knownConflictingComponents();
|
QStringList knownConflictingComponents();
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ void VersionPage::updateButtons(int row)
|
|||||||
ui->actionRemove->setEnabled(patch && patch->isRemovable());
|
ui->actionRemove->setEnabled(patch && patch->isRemovable());
|
||||||
ui->actionMove_down->setEnabled(patch && patch->isMoveable());
|
ui->actionMove_down->setEnabled(patch && patch->isMoveable());
|
||||||
ui->actionMove_up->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->actionEdit->setEnabled(patch && patch->isCustom());
|
||||||
ui->actionCustomize->setEnabled(patch && patch->isCustomizable());
|
ui->actionCustomize->setEnabled(patch && patch->isCustomizable());
|
||||||
ui->actionRevert->setEnabled(patch && patch->isRevertible());
|
ui->actionRevert->setEnabled(patch && patch->isRevertible());
|
||||||
|
Loading…
Reference in New Issue
Block a user