[Panorama Viewer] auto fit panorama when ready

This commit is contained in:
Thomas Zorroche 2021-03-03 13:02:09 +01:00 committed by Fabien Castan
parent bdfda8a27b
commit f39fb4effd

View file

@ -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();
}
}
}