From 479e183a2c56eaf65a9734dcd134c534ce5e6642 Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Tue, 10 Nov 2009 14:04:52 +0100 Subject: Fixes sub-attaq demo, unfreeze boat after launching new game when on pause Task-number: QTBUG-5526 Reviewed-by: thierry --- demos/sub-attaq/boat.cpp | 6 +++--- demos/sub-attaq/graphicsscene.cpp | 1 + 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); } -- cgit v0.12