From f39fb4effd2a1d9bb36c9050cd18fe8f46f33eda Mon Sep 17 00:00:00 2001 From: Thomas Zorroche Date: Wed, 3 Mar 2021 13:02:09 +0100 Subject: [PATCH] [Panorama Viewer] auto fit panorama when ready --- meshroom/ui/qml/Viewer/Viewer2D.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index ad0bc005..e0955925 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -272,6 +272,8 @@ FocusScope { onLoaded: { panoramaViewerLoader.item.updateSfmPath(); } + + } // Simple QML Image Viewer (using Qt or qtOIIO to load images) @@ -900,5 +902,10 @@ FocusScope { } // disable the visibility when unused to avoid stealing the mouseEvent to the image color picker visible: running + + onVisibleChanged: { + if (panoramaViewerLoader.active && panoramaViewerLoader.item.status === Image.Ready) + fit(); + } } }