effects/magiclamp: Fix window suddenly disappearing when reversing minimize animation

In this branch a new animation is being started, so a ref-guard needs
to be the same as in the similar branch for starting minimize animation
in the slot above.
This commit is contained in:
ivan tkachenko 2023-01-11 14:35:20 +03:00
parent f4c3ae7c20
commit ea61a6f63a
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -357,6 +357,7 @@ void MagicLampEffect::slotWindowUnminimized(EffectWindow *w)
if (animation.timeLine.running()) {
animation.timeLine.toggleDirection();
} else {
animation.visibleRef = EffectWindowVisibleRef(w, EffectWindow::PAINT_DISABLED_BY_MINIMIZE);
animation.timeLine.setDirection(TimeLine::Backward);
animation.timeLine.setDuration(m_duration);
animation.timeLine.setEasingCurve(QEasingCurve::Linear);