fix for the root cause of issue 434 (previous pages being visible in the background)
authorsheepluva
Fri, 26 Oct 2012 19:38:25 +0200
changeset 7826 9f529722d61e
parent 7825 1b96361a7ef4
child 7827 353d90ddc188
fix for the root cause of issue #434 (previous pages being visible in the background)
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Fri Oct 26 12:42:56 2012 -0400
+++ b/QTfrontend/hwform.cpp	Fri Oct 26 19:38:25 2012 +0200
@@ -700,9 +700,10 @@
         group->addAnimation(animationOldOpacity);
         group->addAnimation(animationNewOpacity);
 #endif
+
+        connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide()));
         group->start();
 
-        connect(animationOldSlide, SIGNAL(finished()), ui.Pages->widget(lastid), SLOT(hide()));
     	/* 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();
     }
@@ -813,11 +814,18 @@
         group->addAnimation(animationOldOpacity);
         group->addAnimation(animationNewOpacity);
 #endif
-        group->start();
 
         connect(animationNewSlide, SIGNAL(finished()), ui.Pages->widget(curid), SLOT(hide()));
+        group->start();
     }
 #endif
+
+    if (stopAnim)
+        ui.Pages->widget(curid)->hide();
+
+// TODO the whole pages shown and effects stuff should be moved
+// out of hwform.cpp and into a subclass of QStackedLayout
+
 }
 
 void HWForm::OpenSnapshotFolder()