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())