summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-10 13:04:52 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-10 13:19:28 (GMT)
commit479e183a2c56eaf65a9734dcd134c534ce5e6642 (patch)
tree0b528ee17b9ddfb537c7ef6f3bed3394a358402a /demos
parentb7ae1d97301dcb42997e09f996b103f3701b2139 (diff)
downloadQt-479e183a2c56eaf65a9734dcd134c534ce5e6642.zip
Qt-479e183a2c56eaf65a9734dcd134c534ce5e6642.tar.gz
Qt-479e183a2c56eaf65a9734dcd134c534ce5e6642.tar.bz2
Fixes sub-attaq demo, unfreeze boat after launching new game when on pause
Task-number: QTBUG-5526 Reviewed-by: thierry
Diffstat (limited to 'demos')
-rw-r--r--demos/sub-attaq/boat.cpp6
-rw-r--r--demos/sub-attaq/graphicsscene.cpp1
2 files changed, 4 insertions, 3 deletions
diff --git a/demos/sub-attaq/boat.cpp b/demos/sub-attaq/boat.cpp
index 0ad31b1..6fed9a9 100644
--- a/demos/sub-attaq/boat.cpp
+++ b/demos/sub-attaq/boat.cpp
@@ -62,7 +62,7 @@ static QAbstractAnimation *setupDestroyAnimation(Boat *boat)
for (int i = 1; i <= 4; i++) {
PixmapItem *step = new PixmapItem(QString("explosion/boat/step%1").arg(i),GraphicsScene::Big, boat);
step->setZValue(6);
- step->setOpacity(0);
+ step->setOpacity(0);
//fade-in
QPropertyAnimation *anim = new QPropertyAnimation(step, "opacity");
@@ -92,10 +92,10 @@ Boat::Boat() : PixmapItem(QString("boat"), GraphicsScene::Big),
//The movement animation used to animate the boat
movementAnimation = new QPropertyAnimation(this, "pos");
- //The movement animation used to animate the boat
+ //The destroy animation used to explode the boat
destroyAnimation = setupDestroyAnimation(this);
- //We setup the state machien of the boat
+ //We setup the state machine of the boat
machine = new QStateMachine(this);
QState *moving = new QState(machine);
StopState *stopState = new StopState(this, moving);
diff --git a/demos/sub-attaq/graphicsscene.cpp b/demos/sub-attaq/graphicsscene.cpp
index e29095e..71d4fe7 100644
--- a/demos/sub-attaq/graphicsscene.cpp
+++ b/demos/sub-attaq/graphicsscene.cpp
@@ -278,4 +278,5 @@ void GraphicsScene::clearScene()
boat->stop();
boat->hide();
+ boat->setEnabled(true);
}