Skip to content

Commit db596c8

Browse files
committed
[qt6][Viewer] Viewer2D: Fix automatic fitting for missing orientation tags
1 parent d0b7b92 commit db596c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

meshroom/ui/qml/Viewer/Viewer2D.qml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ FocusScope {
153153
// Functions
154154
function fit() {
155155
// Make sure the image is ready for use
156-
if (!imgContainer.image || imgContainer.orientationTag == undefined) {
156+
if (!imgContainer.image) {
157157
return false
158158
}
159159

@@ -477,7 +477,7 @@ FocusScope {
477477
property bool fittedOnce: false
478478
property int previousWidth: 0
479479
property int previousHeight: 0
480-
property int previousOrientationTag: 1
480+
property int previousOrientationTag: -1
481481
property real targetSize: Math.max(width, height) * imgContainer.scale
482482
onWidthChanged: {
483483
/* We want to do the auto-fit on the first display of an image from the group, and then keep its
@@ -495,8 +495,9 @@ FocusScope {
495495
previousWidth = width
496496
previousHeight = height
497497

498-
if (orientationTag != undefined)
498+
if (orientationTag != undefined) {
499499
previousOrientationTag = orientationTag
500+
}
500501
}
501502
}
502503

0 commit comments

Comments
 (0)