mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +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);
|
||||
|
||||
// workaround for QTBUG-22819: when the error label word wrap, the minimum height is not adjusted
|
||||
int hfw = currentPage()->heightForWidth(currentPage()->width());
|
||||
if (currentPage()->height() < hfw) {
|
||||
currentPage()->setMinimumSize(currentPage()->minimumSizeHint().width(), hfw);
|
||||
setTitleFormat(titleFormat()); // And another workaround for QTBUG-3396
|
||||
if (auto page = currentPage()) {
|
||||
int hfw = page->heightForWidth(page->width());
|
||||
if (page->height() < hfw) {
|
||||
page->setMinimumSize(page->minimumSizeHint().width(), hfw);
|
||||
setTitleFormat(titleFormat()); // And another workaround for QTBUG-3396
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue