--- a/QTfrontend/hwform.cpp Sun Oct 28 12:36:08 2012 -0400
+++ b/QTfrontend/hwform.cpp Sun Oct 28 20:35:08 2012 +0100
@@ -693,16 +693,12 @@
animationOldOpacity->setEasingCurve(QEasingCurve::OutExpo);
#endif
- QParallelAnimationGroup *group = new QParallelAnimationGroup;
- group->addAnimation(animationOldSlide);
- group->addAnimation(animationNewSlide);
-#ifdef false
- group->addAnimation(animationOldOpacity);
- group->addAnimation(animationNewOpacity);
-#endif
+ // let's hide the old slide after its animation has finished
+ connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide()));
- connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide()));
- group->start();
+ // start animations
+ animationOldSlide->start(QAbstractAnimation::DeleteWhenStopped);
+ animationNewSlide->start(QAbstractAnimation::DeleteWhenStopped);
/* this is for the situation when the animation below is interrupted by a new animation. For some reason, finished is not being fired */
for(int i=0;i<MAX_PAGE;i++) if (i!=id && i!=lastid) ui.Pages->widget(i)->hide();
@@ -807,16 +803,12 @@
animationNewOpacity->setEasingCurve(QEasingCurve::OutExpo);
#endif
- QParallelAnimationGroup *group = new QParallelAnimationGroup;
- group->addAnimation(animationOldSlide);
- group->addAnimation(animationNewSlide);
-#ifdef false
- group->addAnimation(animationOldOpacity);
- group->addAnimation(animationNewOpacity);
-#endif
+ // let's hide the old slide after its animation has finished
+ connect(animationNewSlide, SIGNAL(finished()), ui.Pages->widget(curid), SLOT(hide()));
- connect(animationNewSlide, SIGNAL(finished()), ui.Pages->widget(curid), SLOT(hide()));
- group->start();
+ // start animations
+ animationOldSlide->start(QAbstractAnimation::DeleteWhenStopped);
+ animationNewSlide->start(QAbstractAnimation::DeleteWhenStopped);
}
#endif