summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-11-10 13:04:52 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-11-13 12:39:11 (GMT)
commit48a3bd2fb022204c8517eed90d76374298fad9b4 (patch)
treebeef7b08c0dc9955747075d8008f6dd34ff8c31e /demos
parentad20f1cd5d4f8731cb293ce9c66edb3f6c2a1133 (diff)
downloadQt-48a3bd2fb022204c8517eed90d76374298fad9b4.zip
Qt-48a3bd2fb022204c8517eed90d76374298fad9b4.tar.gz
Qt-48a3bd2fb022204c8517eed90d76374298fad9b4.tar.bz2
Fixes sub-attaq demo, unfreeze boat after launching new game when on pause
Task-number: QTBUG-5526 Reviewed-by: thierry (cherry picked from commit 479e183a2c56eaf65a9734dcd134c534ce5e6642)
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);
}