diff options
author | Loïc Vital <mugulmotion@gmail.com> | 2022-10-07 17:33:02 +0300 |
---|---|---|
committer | Fabien Castan <fabcastan@gmail.com> | 2022-10-19 11:50:22 +0300 |
commit | 18b5f4bb2194777fc25517866996d2972e43b5f7 (patch) | |
tree | 3e77029b44bd9fd9b886eed5b588e81dbb14c5ce | |
parent | a5fbbe7d8248c0c011bdb12ee17cd224c490072f (diff) |
[ui] always display at least "Image Gallery" in ComboBox
-rw-r--r-- | meshroom/ui/qml/Viewer/Viewer2D.qml | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 2fc02bc7..4032e106 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -200,7 +200,7 @@ FocusScope { if (useExternal) { return sourceExternal; } - if (!displayedNode || outputAttribute.name == "" || outputAttribute.name == "gallery") { + if (!displayedNode || outputAttribute.name == "gallery") { return getViewpointPath(_reconstruction.selectedViewId); } return getFileAttributePath(displayedNode, outputAttribute.name, _reconstruction.selectedViewId); @@ -264,11 +264,8 @@ FocusScope { names.push(attr.name); } } - // ensure that we can always visualize the gallery - if (names.length > 0) { - names.push("gallery"); - } } + names.push("gallery"); outputAttribute.names = names; } @@ -1108,10 +1105,10 @@ FocusScope { Layout.minimumWidth: 0 flat: true - property var names: [] - property string name: names[currentIndex] ? names[currentIndex] : "" + property var names: ["gallery"] + property string name: names[currentIndex] - model: displayedNode ? names.map(n => (n == "gallery") ? "Image Gallery" : displayedNode.attributes.get(n).label) : [] + model: names.map(n => (n == "gallery") ? "Image Gallery" : displayedNode.attributes.get(n).label) enabled: count > 0 FontMetrics { |