[qt6][Viewer] Viewer2D: Fix automatic fitting for missing orientation tags

This commit is contained in:
Candice Bentéjac 2024-10-17 15:14:07 +02:00
parent d4eb365ada
commit 36f7f4e420

View file

@ -161,7 +161,7 @@ FocusScope {
// Functions
function fit() {
// Make sure the image is ready for use
if (!imgContainer.image || imgContainer.orientationTag == undefined) {
if (!imgContainer.image) {
return false
}
@ -482,7 +482,6 @@ FocusScope {
orientationTag: imgContainer.orientationTag
xOrigin: imgContainer.width / 2
yOrigin: imgContainer.height / 2
property real targetSize: Math.max(width, height) * imgContainer.scale
property real resizeRatio: imgContainer.scale