diff options
Diffstat (limited to 'gui/dialogs')
-rw-r--r-- | gui/dialogs/VersionSelectDialog.cpp | 18 | ||||
-rw-r--r-- | gui/dialogs/VersionSelectDialog.h | 1 |
2 files changed, 1 insertions, 18 deletions
diff --git a/gui/dialogs/VersionSelectDialog.cpp b/gui/dialogs/VersionSelectDialog.cpp index a8cbda00..7f99f8e6 100644 --- a/gui/dialogs/VersionSelectDialog.cpp +++ b/gui/dialogs/VersionSelectDialog.cpp @@ -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(); } diff --git a/gui/dialogs/VersionSelectDialog.h b/gui/dialogs/VersionSelectDialog.h index 10f31377..42fb94cc 100644 --- a/gui/dialogs/VersionSelectDialog.h +++ b/gui/dialogs/VersionSelectDialog.h @@ -63,5 +63,4 @@ private: VersionSelectProxyModel *m_proxyModel; int resizeOnColumn = 0; - bool m_useLatest; }; |