From 65138c67a00b9ae9a182d33e2b806bdd09d11fa6 Mon Sep 17 00:00:00 2001 From: Julien-Haudegond <44610840+Julien-Haudegond@users.noreply.github.com> Date: Mon, 24 Aug 2020 18:37:46 +0200 Subject: [PATCH] [ui] MediaLibrary: fix dependencyReady binding --- meshroom/ui/qml/Viewer3D/MediaLibrary.qml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/meshroom/ui/qml/Viewer3D/MediaLibrary.qml b/meshroom/ui/qml/Viewer3D/MediaLibrary.qml index 1c201cff..624a579a 100644 --- a/meshroom/ui/qml/Viewer3D/MediaLibrary.qml +++ b/meshroom/ui/qml/Viewer3D/MediaLibrary.qml @@ -203,14 +203,12 @@ Entity { property string rawSource: attribute ? attribute.value : model.source // whether dependencies are statified (applies for output/connected input attributes only) readonly property bool dependencyReady: { - if(!attribute) - // if the node is removed, the attribute will be invalid - return false - - const rootAttribute = attribute.isLink ? attribute.rootLinkParam : attribute - if(rootAttribute.isOutput) - return rootAttribute.node.globalStatus === "SUCCESS" - return true // is an input param so no dependency + if(attribute) { + const rootAttribute = attribute.isLink ? attribute.rootLinkParam : attribute + if(rootAttribute.isOutput) + return rootAttribute.node.globalStatus === "SUCCESS" + } + return true // is an input param without link (so no dependency) or an external file } // source based on raw source + dependency status property string currentSource: dependencyReady ? rawSource : ""