Skip to content

Commit

Permalink
Merge pull request #1829 from alicevision/fix/imgDropViewer2D
Browse files Browse the repository at this point in the history
[ui] Viewer2D: fix minor issues
  • Loading branch information
fabiencastan authored Nov 30, 2022
2 parents 02b2d84 + 278538f commit b3c1196
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions meshroom/ui/qml/Viewer/Viewer2D.qml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ FocusScope {
onSelectedViewIdChanged: {
root.source = getImageFile();
root.metadata = getMetadata();
if (useExternal)
useExternal = false;
}
}

Expand Down Expand Up @@ -663,6 +665,7 @@ FocusScope {
text: MaterialIcons.close
ToolTip.text: "Clear node"
enabled: root.displayedNode
visible: root.displayedNode
onClicked: {
root.displayedNode = null
}
Expand Down Expand Up @@ -1154,12 +1157,12 @@ FocusScope {
property string name: names[currentIndex]

model: names.map(n => (n == "gallery") ? "Image Gallery" : displayedNode.attributes.get(n).label)
enabled: count > 0
enabled: count > 1

FontMetrics {
id: fontMetrics
}
Layout.preferredWidth: model.reduce((acc, label) => Math.max(acc, fontMetrics.boundingRect(label).width), 0) + 3.0*Qt.application.font.pixelSize
Layout.preferredWidth: model.reduce((acc, label) => Math.max(acc, fontMetrics.boundingRect(label).width), 0) + 3.0 * Qt.application.font.pixelSize
}

MaterialToolButton {
Expand Down

0 comments on commit b3c1196

Please sign in to comment.