mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Fix resizing crash when currentPage() is null
Sentry: https://sentry.io/owncloud/desktop-win-and-mac/issues/425331770/
This commit is contained in:
parent
883deb1c5d
commit
cdd8d10940
1 changed files with 6 additions and 4 deletions
|
@ -568,10 +568,12 @@ void FolderWizard::resizeEvent(QResizeEvent *event)
|
||||||
QWizard::resizeEvent(event);
|
QWizard::resizeEvent(event);
|
||||||
|
|
||||||
// workaround for QTBUG-22819: when the error label word wrap, the minimum height is not adjusted
|
// workaround for QTBUG-22819: when the error label word wrap, the minimum height is not adjusted
|
||||||
int hfw = currentPage()->heightForWidth(currentPage()->width());
|
if (auto page = currentPage()) {
|
||||||
if (currentPage()->height() < hfw) {
|
int hfw = page->heightForWidth(page->width());
|
||||||
currentPage()->setMinimumSize(currentPage()->minimumSizeHint().width(), hfw);
|
if (page->height() < hfw) {
|
||||||
setTitleFormat(titleFormat()); // And another workaround for QTBUG-3396
|
page->setMinimumSize(page->minimumSizeHint().width(), hfw);
|
||||||
|
setTitleFormat(titleFormat()); // And another workaround for QTBUG-3396
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue