diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-11-16 01:56:07 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-11-16 01:56:07 +0100 |
commit | 1d5c09051c6d05c2bfaec0b8cabd482cecad5740 (patch) | |
tree | cfaf1a697fa9acb99b42ce10bfe072f0da2965f0 /gui/dialogs | |
parent | 940f160091bc365dbd70483890e1deff2c99e75e (diff) | |
download | MultiMC-1d5c09051c6d05c2bfaec0b8cabd482cecad5740.tar MultiMC-1d5c09051c6d05c2bfaec0b8cabd482cecad5740.tar.gz MultiMC-1d5c09051c6d05c2bfaec0b8cabd482cecad5740.tar.lz MultiMC-1d5c09051c6d05c2bfaec0b8cabd482cecad5740.tar.xz MultiMC-1d5c09051c6d05c2bfaec0b8cabd482cecad5740.zip |
VersionSelectDialog is for SELECTING versions.
Not blinking in and out of existence. That is not the job of a version SELECTION dialog.
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; }; |