Skip to content

Commit 91fcbe0

Browse files
committed
[qt6][Viewer] Viewer2D: Fix automatic fitting for missing orientation tags
1 parent fd1636c commit 91fcbe0

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
@@ -156,7 +156,7 @@ FocusScope {
156156
// Functions
157157
function fit() {
158158
// Make sure the image is ready for use
159-
if (!imgContainer.image || imgContainer.orientationTag == undefined) {
159+
if (!imgContainer.image) {
160160
return false
161161
}
162162

@@ -480,7 +480,7 @@ FocusScope {
480480
property bool fittedOnce: false
481481
property int previousWidth: 0
482482
property int previousHeight: 0
483-
property int previousOrientationTag: 1
483+
property int previousOrientationTag: -1
484484
property real targetSize: Math.max(width, height) * imgContainer.scale
485485
onWidthChanged: {
486486
/* We want to do the auto-fit on the first display of an image from the group, and then keep its
@@ -498,8 +498,9 @@ FocusScope {
498498
previousWidth = width
499499
previousHeight = height
500500

501-
if (orientationTag != undefined)
501+
if (orientationTag != undefined) {
502502
previousOrientationTag = orientationTag
503+
}
503504
}
504505
}
505506

0 commit comments

Comments
 (0)