Skip to content

Commit 52f808c

Browse files
committed
ProjectPlayer: Hide background when there isn't any loaded project
Resolves: #113
1 parent 93504fb commit 52f808c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ProjectPlayer.qml

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ ProjectScene {
2929
engine: loader.engine
3030
stageScale: (stageWidth == 0 || stageHeight == 0) ? 1 : Math.min(width / stageWidth, height / stageHeight)
3131
onFileNameChanged: priv.loading = true;
32+
onLoaded: priv.loaded = true
33+
onFailedToLoad: priv.loaded = false
3234

3335
function load(fileName) {
3436
loader.fileName = fileName;
@@ -37,6 +39,7 @@ ProjectScene {
3739
QtObject {
3840
id: priv
3941
property bool loading: false
42+
property bool loaded: false
4043
}
4144

4245
ProjectLoader {
@@ -111,7 +114,7 @@ ProjectScene {
111114
anchors.top: parent.top
112115
width: stageWidth * stageScale
113116
height: stageHeight * stageScale
114-
color: priv.loading ? "transparent" : "white"
117+
color: priv.loading || !priv.loaded ? "transparent" : "white"
115118
clip: true
116119

117120
RenderedTarget {

0 commit comments

Comments
 (0)