Fix the selective sync notification folder list being cropped

The maximumHeight would stay at the last animated value.

Issue #5492
This commit is contained in:
Jocelyn Turcotte 2017-07-27 10:46:46 +02:00
parent 41ed603abf
commit 90cce0ab56

View file

@ -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);
connect(anim, &QPropertyAnimation::finished, [this, shouldBeVisible]() {
ui->selectiveSyncStatus->setMaximumHeight(QWIDGETSIZE_MAX);
if (!shouldBeVisible) {
connect(anim, SIGNAL(finished()), ui->selectiveSyncStatus, SLOT(hide()));
ui->selectiveSyncStatus->hide();
}
});
}
}