From a5b2bc5e60e7a9d66dfd8fe8b4c7a24514724e3d Mon Sep 17 00:00:00 2001 From: mugulmd Date: Thu, 29 Dec 2022 01:39:04 -0800 Subject: [PATCH] [ui] FeaturesViewer: apply container dimensions for correct transform --- meshroom/ui/qml/Viewer/Viewer2D.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index ce1bde5b..1cb6287d 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -526,6 +526,10 @@ FocusScope { active: displayFeatures.checked property var activeNode: _reconstruction ? _reconstruction.activeNodes.get("FeatureExtraction").node : null + anchors.centerIn: parent + width: imgContainer.width + height: imgContainer.height + // handle rotation/position based on available metadata rotation: { var orientation = m.imgMetadata ? m.imgMetadata["Orientation"] : 0 @@ -535,8 +539,6 @@ FocusScope { default: return 0; } } - x: (imgContainer.image && rotation === 90) ? imgContainer.image.paintedWidth : 0 - y: (imgContainer.image && rotation === -90) ? imgContainer.image.paintedHeight : 0 onActiveChanged: { if(active) {