# HG changeset patch
# User sheepluva
# Date 1351273105 -7200
# Node ID 9f529722d61e8fa8e7fbdc4a9da3d10827a05d14
# Parent  1b96361a7ef4ce4d8f95b2fcd941a5c636b6697f
fix for the root cause of issue 434 (previous pages being visible in the background)

diff -r 1b96361a7ef4 -r 9f529722d61e 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()