[Panorama Viewer] Fix crash on new pipeline action

This commit is contained in:
Landrodie 2021-03-25 12:15:13 +01:00 committed by Fabien Castan
parent cf6d821595
commit f8a1e006dc

View file

@ -255,8 +255,8 @@ FocusScope {
// qtAliceVision Panorama Viewer // qtAliceVision Panorama Viewer
Loader { Loader {
id: panoramaViewerLoader id: panoramaViewerLoader
active: root.aliceVisionPluginAvailable && root.usePanoramaViewer && !floatImageViewerLoader.active active: root.aliceVisionPluginAvailable && root.usePanoramaViewer && !floatImageViewerLoader.active && _reconstruction.activeNodes.get('sfm').node
visible: (panoramaViewerLoader.status === Loader.Ready) visible: (panoramaViewerLoader.status === Loader.Ready) && active
anchors.centerIn: parent anchors.centerIn: parent
onActiveChanged: { onActiveChanged: {
@ -272,6 +272,7 @@ FocusScope {
} else { } else {
// Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14 // Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14
setSource("", {}) setSource("", {})
displayPanoramaViewer.checked = false;
} }
} }
onLoaded: { onLoaded: {