Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alicevision/meshroom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'meshroom/ui/qml/Viewer/Viewer2D.qml')
-rw-r--r--meshroom/ui/qml/Viewer/Viewer2D.qml28
1 files changed, 12 insertions, 16 deletions
diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml
index e47c6bf9..4e0a4106 100644
--- a/meshroom/ui/qml/Viewer/Viewer2D.qml
+++ b/meshroom/ui/qml/Viewer/Viewer2D.qml
@@ -228,25 +228,21 @@ FocusScope {
}
onDisplayedNodeChanged: {
- // safety check
- if (!displayedNode) {
- return;
- }
-
var names = [];
- // store attr name for output attributes that represent images
- for (var i = 0; i < displayedNode.attributes.count; i++) {
- var attr = displayedNode.attributes.at(i);
- if (attr.isOutput && attr.desc.semantic == "image") {
- names.push(attr.name);
+ // safety check
+ if (displayedNode) {
+ // store attr name for output attributes that represent images
+ for (var i = 0; i < displayedNode.attributes.count; i++) {
+ var attr = displayedNode.attributes.at(i);
+ if (attr.isOutput && attr.desc.semantic == "image") {
+ names.push(attr.name);
+ }
+ }
+ // ensure that we can always visualize the gallery
+ if (names.length > 0) {
+ names.push("gallery");
}
}
-
- // ensure that we can always visualize the gallery
- if (names.length > 0) {
- names.push("gallery");
- }
-
outputAttribute.names = names;
}