mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
VersionSelectDialog is for SELECTING versions.
Not blinking in and out of existence. That is not the job of a version SELECTION dialog.
This commit is contained in:
parent
940f160091
commit
1d5c09051c
2 changed files with 1 additions and 18 deletions
|
|
@ -89,7 +89,7 @@ protected:
|
|||
|
||||
VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, QWidget *parent,
|
||||
bool cancelable)
|
||||
: QDialog(parent), ui(new Ui::VersionSelectDialog), m_useLatest(false)
|
||||
: QDialog(parent), ui(new Ui::VersionSelectDialog)
|
||||
{
|
||||
MultiMCPlatform::fixWM_CLASS(this);
|
||||
ui->setupUi(this);
|
||||
|
|
@ -128,11 +128,6 @@ void VersionSelectDialog::setResizeOn(int column)
|
|||
ui->listView->header()->setSectionResizeMode(resizeOnColumn, QHeaderView::Stretch);
|
||||
}
|
||||
|
||||
void VersionSelectDialog::setUseLatest(const bool useLatest)
|
||||
{
|
||||
m_useLatest = useLatest;
|
||||
}
|
||||
|
||||
int VersionSelectDialog::exec()
|
||||
{
|
||||
QDialog::open();
|
||||
|
|
@ -141,17 +136,6 @@ int VersionSelectDialog::exec()
|
|||
loadList();
|
||||
}
|
||||
m_proxyModel->invalidate();
|
||||
if (m_proxyModel->rowCount() == 0)
|
||||
{
|
||||
QLOG_DEBUG() << "No rows in version list";
|
||||
return QDialog::Rejected;
|
||||
}
|
||||
if (m_proxyModel->rowCount() == 1 || m_useLatest)
|
||||
{
|
||||
ui->listView->selectionModel()->setCurrentIndex(m_proxyModel->index(0, 0),
|
||||
QItemSelectionModel::ClearAndSelect);
|
||||
return QDialog::Accepted;
|
||||
}
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue