summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-02-25 05:51:14 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-02-25 05:56:46 (GMT)
commitd16d34a90d20e326a38b890e3665b3b8656ee414 (patch)
tree419a03f4eb3b5412c7b708c3b802d039faf9ccd4 /demos
parent9616583e19bb642da8f2d2f4305ddef8ee16feb3 (diff)
downloadQt-d16d34a90d20e326a38b890e3665b3b8656ee414.zip
Qt-d16d34a90d20e326a38b890e3665b3b8656ee414.tar.gz
Qt-d16d34a90d20e326a38b890e3665b3b8656ee414.tar.bz2
Recfactor in declarative snake demo
Avoid having 2 'states' that have 'when' conditions that can be 'true' at the same time.
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/snake/snake.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 3bec747..09b6b7f 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -172,14 +172,14 @@ Rectangle {
states: [
State {
name: "starting"
- when: startHeartbeatTimer.running;
+ when: startHeartbeatTimer.running
PropertyChanges {target: progressIndicator; width: 200}
PropertyChanges {target: title; opacity: 0}
PropertyChanges {target: progressBar; opacity: 1}
},
State {
name: "running"
- when: heartbeat.running
+ when: (heartbeat.running && !startHeartbeatTimer.running)
PropertyChanges {target: progressIndicator; width: 200}
PropertyChanges {target: title; opacity: 0}
PropertyChanges {target: skull; row: 0; column: 0; }