diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-04-02 22:58:02 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-04-02 22:58:02 +0200 |
commit | 3406335cd8044b38c9805a8d39bb2839b63ea22b (patch) | |
tree | 64e8d21e52d7fbc85ad8b878cbaac92ba5340ec3 | |
parent | c9832d0d8603ba2420a093f44cb5037e18e938f6 (diff) | |
download | MultiMC-3406335cd8044b38c9805a8d39bb2839b63ea22b.tar MultiMC-3406335cd8044b38c9805a8d39bb2839b63ea22b.tar.gz MultiMC-3406335cd8044b38c9805a8d39bb2839b63ea22b.tar.lz MultiMC-3406335cd8044b38c9805a8d39bb2839b63ea22b.tar.xz MultiMC-3406335cd8044b38c9805a8d39bb2839b63ea22b.zip |
GH-2219 fix crash and bad view scaling in Java VersionSelectDialog
-rw-r--r-- | application/dialogs/VersionSelectDialog.cpp | 6 | ||||
-rw-r--r-- | application/dialogs/VersionSelectDialog.h | 2 | ||||
-rw-r--r-- | application/pages/global/JavaPage.cpp | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/application/dialogs/VersionSelectDialog.cpp b/application/dialogs/VersionSelectDialog.cpp index 1ed81e79..c7009497 100644 --- a/application/dialogs/VersionSelectDialog.cpp +++ b/application/dialogs/VersionSelectDialog.cpp @@ -101,13 +101,17 @@ void VersionSelectDialog::setEmptyErrorString(QString emptyErrorString) void VersionSelectDialog::setResizeOn(int column) { - m_versionWidget->setResizeOn(column); + resizeOnColumn = column; } int VersionSelectDialog::exec() { QDialog::open(); m_versionWidget->initialize(m_vlist); + if(resizeOnColumn != -1) + { + m_versionWidget->setResizeOn(resizeOnColumn); + } return QDialog::exec(); } diff --git a/application/dialogs/VersionSelectDialog.h b/application/dialogs/VersionSelectDialog.h index c8b00c65..127a0ee9 100644 --- a/application/dialogs/VersionSelectDialog.h +++ b/application/dialogs/VersionSelectDialog.h @@ -72,7 +72,7 @@ private: VersionProxyModel *m_proxyModel = nullptr; - int resizeOnColumn = 0; + int resizeOnColumn = -1; Task * loadTask = nullptr; }; diff --git a/application/pages/global/JavaPage.cpp b/application/pages/global/JavaPage.cpp index 57250c79..42577a88 100644 --- a/application/pages/global/JavaPage.cpp +++ b/application/pages/global/JavaPage.cpp @@ -104,6 +104,7 @@ void JavaPage::on_javaDetectBtn_clicked() JavaInstallPtr java; VersionSelectDialog vselect(MMC->javalist().get(), tr("Select a Java version"), this, true); + vselect.setResizeOn(2); vselect.exec(); if (vselect.result() == QDialog::Accepted && vselect.selectedVersion()) |