GH-2219 fix crash and bad view scaling in Java VersionSelectDialog
This commit is contained in:
parent
c9832d0d86
commit
3406335cd8
@ -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();
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ private:
|
||||
|
||||
VersionProxyModel *m_proxyModel = nullptr;
|
||||
|
||||
int resizeOnColumn = 0;
|
||||
int resizeOnColumn = -1;
|
||||
|
||||
Task * loadTask = nullptr;
|
||||
};
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user