summaryrefslogtreecommitdiffstats
path: root/demos/sub-attaq
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-10 14:04:52 +0100
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-10 14:19:28 +0100
commit479e183a2c56eaf65a9734dcd134c534ce5e6642 (patch)
tree0b528ee17b9ddfb537c7ef6f3bed3394a358402a /demos/sub-attaq
parentb7ae1d97301dcb42997e09f996b103f3701b2139 (diff)
Fixes sub-attaq demo, unfreeze boat after launching new game when on pause
Task-number: QTBUG-5526 Reviewed-by: thierry
Diffstat (limited to 'demos/sub-attaq')
-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 0ad31b1246..6fed9a9228 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 e29095ed03..71d4fe73a0 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);
}