From 90cce0ab56dde825a01d5943fb26c9352b18a730 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 27 Jul 2017 10:46:46 +0200 Subject: [PATCH] Fix the selective sync notification folder list being cropped The maximumHeight would stay at the last animated value. Issue #5492 --- src/gui/accountsettings.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 51a6130a6..392bd1efc 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -804,9 +804,12 @@ void AccountSettings::refreshSelectiveSyncStatus() auto anim = new QPropertyAnimation(ui->selectiveSyncStatus, "maximumHeight", ui->selectiveSyncStatus); anim->setEndValue(shouldBeVisible ? hint.height() : 0); anim->start(QAbstractAnimation::DeleteWhenStopped); - if (!shouldBeVisible) { - connect(anim, SIGNAL(finished()), ui->selectiveSyncStatus, SLOT(hide())); - } + connect(anim, &QPropertyAnimation::finished, [this, shouldBeVisible]() { + ui->selectiveSyncStatus->setMaximumHeight(QWIDGETSIZE_MAX); + if (!shouldBeVisible) { + ui->selectiveSyncStatus->hide(); + } + }); } } -- 2.30.2