Workaround for stuck pages.
--- a/QTfrontend/hwform.cpp Wed May 02 21:45:55 2012 +0200
+++ b/QTfrontend/hwform.cpp Wed May 02 18:36:27 2012 -0400
@@ -624,8 +624,12 @@
OnPageShown(id, lastid);
ui.Pages->setCurrentIndex(id);
- if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
+
+ /* if (id == ID_PAGE_DRAWMAP || id == ID_PAGE_GAMESTATS)
stopAnim = true;
+ This were disabled due to broken flake animations. I believe the more general problems w/ opacity that forced its disable makes blocking these
+ unnecessary.
+ */
#if (QT_VERSION >= 0x040600)
if (!stopAnim)
@@ -646,7 +650,7 @@
//New page animation
animationNewSlide = new QPropertyAnimation(ui.Pages->widget(id), "pos");
animationNewSlide->setDuration(duration);
- animationNewSlide->setStartValue(QPoint(this->width()*1.5/coeff, 0));
+ animationNewSlide->setStartValue(QPoint(width()/coeff, 0));
animationNewSlide->setEndValue(QPoint(0, 0));
animationNewSlide->setEasingCurve(QEasingCurve::OutExpo);
@@ -664,7 +668,7 @@
animationOldSlide = new QPropertyAnimation(ui.Pages->widget(lastid), "pos");
animationOldSlide->setDuration(duration);
animationOldSlide->setStartValue(QPoint(0, 0));
- animationOldSlide->setEndValue(QPoint(this->width()*1.5/coeff, 0));
+ animationOldSlide->setEndValue(QPoint(-width()/coeff, 0));
animationOldSlide->setEasingCurve(QEasingCurve::OutExpo);
#ifdef false
@@ -685,6 +689,8 @@
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();
}
#endif
}
@@ -718,8 +724,8 @@
stopAnim = true;
GoBack();
}
- if (curid == ID_PAGE_DRAWMAP)
- stopAnim = true;
+ /*if (curid == ID_PAGE_DRAWMAP)
+ stopAnim = true; */
if ((!hwnet) || (!hwnet->isInRoom()))
if (id == ID_PAGE_NETGAME || id == ID_PAGE_NETGAME)
--- a/QTfrontend/hwform.h Wed May 02 21:45:55 2012 +0200
+++ b/QTfrontend/hwform.h Wed May 02 18:36:27 2012 -0400
@@ -152,29 +152,30 @@
enum PageIDs
{
- ID_PAGE_SETUP_TEAM = 0,
- ID_PAGE_SETUP = 1,
- ID_PAGE_MULTIPLAYER = 2,
- ID_PAGE_DEMOS = 3,
- ID_PAGE_NET = 4,
- ID_PAGE_NETGAME = 5,
- ID_PAGE_INFO = 6,
- ID_PAGE_MAIN = 7,
- ID_PAGE_GAMESTATS = 8,
- ID_PAGE_SINGLEPLAYER = 9,
- ID_PAGE_TRAINING = 10,
- ID_PAGE_SELECTWEAPON = 11,
- ID_PAGE_NETSERVER = 12,
- ID_PAGE_INGAME = 13,
- ID_PAGE_ROOMSLIST = 14,
- ID_PAGE_CONNECTING = 15,
- ID_PAGE_SCHEME = 16,
- ID_PAGE_ADMIN = 17,
- ID_PAGE_NETTYPE = 18,
- ID_PAGE_CAMPAIGN = 19,
- ID_PAGE_DRAWMAP = 20,
- ID_PAGE_DATADOWNLOAD = 21,
- ID_PAGE_FEEDBACK = 22
+ ID_PAGE_SETUP_TEAM ,
+ ID_PAGE_SETUP ,
+ ID_PAGE_MULTIPLAYER ,
+ ID_PAGE_DEMOS ,
+ ID_PAGE_NET ,
+ ID_PAGE_NETGAME ,
+ ID_PAGE_INFO ,
+ ID_PAGE_MAIN ,
+ ID_PAGE_GAMESTATS ,
+ ID_PAGE_SINGLEPLAYER ,
+ ID_PAGE_TRAINING ,
+ ID_PAGE_SELECTWEAPON ,
+ ID_PAGE_NETSERVER ,
+ ID_PAGE_INGAME ,
+ ID_PAGE_ROOMSLIST ,
+ ID_PAGE_CONNECTING ,
+ ID_PAGE_SCHEME ,
+ ID_PAGE_ADMIN ,
+ ID_PAGE_NETTYPE ,
+ ID_PAGE_CAMPAIGN ,
+ ID_PAGE_DRAWMAP ,
+ ID_PAGE_DATADOWNLOAD ,
+ ID_PAGE_FEEDBACK ,
+ MAX_PAGE
};
QPointer<HWGame> game;
QPointer<HWNetServer> pnetserver;