Fix fade in widget animation.

Fixes #5812.
This commit is contained in:
John Preston 2019-03-24 09:51:00 +04:00
parent 2a7fdfc832
commit a0b3b1affd
1 changed files with 5 additions and 6 deletions

View File

@ -146,12 +146,11 @@ void FadeAnimation::startAnimation(int duration) {
}
void FadeAnimation::updateCallback() {
if (_animation.animating()) {
_widget->update();
if (_updatedCallback) {
_updatedCallback(_animation.value(_visible ? 1. : 0.));
}
} else {
_widget->update();
if (_updatedCallback) {
_updatedCallback(_animation.value(_visible ? 1. : 0.));
}
if (!_animation.animating()) {
stopAnimation();
}
}