summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraavit <eirik.aavitsland@digia.com>2013-04-11 14:14:38 +0200
committeraavit <eirik.aavitsland@digia.com>2013-04-11 14:14:38 +0200
commit2ceb4b09650242b97bf17b968c49b6e6cf12601a (patch)
tree853b7176fc5caad87b76d3ee8b5a908f1ef3694e
parent574f8f3d89f3300aa6d916ea225d73536d0f7880 (diff)
Fixes: assert in painterpath on startup
-rw-r--r--basicsuite/Qt5 Cinematic Demo/content/MainView.qml12
1 files changed, 7 insertions, 5 deletions
diff --git a/basicsuite/Qt5 Cinematic Demo/content/MainView.qml b/basicsuite/Qt5 Cinematic Demo/content/MainView.qml
index 3b38782..9f0f8f5 100644
--- a/basicsuite/Qt5 Cinematic Demo/content/MainView.qml
+++ b/basicsuite/Qt5 Cinematic Demo/content/MainView.qml
@@ -124,11 +124,13 @@ Item {
loops: Animation.Infinite
path: Path {
id: lightAnimPath
- startX: root.width*0.4; startY: root.height*0.3
- PathCurve { x: root.width*0.8; y: root.height*0.2 }
- PathCurve { x: root.width*0.8; y: root.height*0.7 }
- PathCurve { x: root.width*0.1; y: root.height*0.6 }
- PathCurve { x: root.width*0.4; y: root.height*0.3 }
+ property int w: root.width > 0 ? root.width : 1
+ property int h: root.height > 0 ? root.height : 1
+ startX: w*0.4; startY: h*0.3
+ PathCurve { x: w*0.8; y: h*0.2 }
+ PathCurve { x: w*0.8; y: h*0.7 }
+ PathCurve { x: w*0.1; y: h*0.6 }
+ PathCurve { x: w*0.4; y: h*0.3 }
}
}