[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 dc6930401e
commit 423e82e28f

View file

@ -277,6 +277,8 @@ FocusScope {
onLoaded: {
panoramaViewerLoader.item.updateSfmPath();
}
}
// Simple QML Image Viewer (using Qt or qtOIIO to load images)
@ -999,5 +1001,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();
}
}
}