diff --git a/meshroom/ui/components/thumbnail.py b/meshroom/ui/components/thumbnail.py index c809f01d..e9ec5fe6 100644 --- a/meshroom/ui/components/thumbnail.py +++ b/meshroom/ui/components/thumbnail.py @@ -271,3 +271,11 @@ class ThumbnailCache(QObject): # No more request to process # Unregister worker thread ThumbnailCache.activeWorkerThreads -= 1 + + @Slot() + def clearRequests(self): + """Clear all pending thumbnail creation requests. + + Requests already under treatment by a worker thread will still be completed. + """ + ThumbnailCache.requests.clear() diff --git a/meshroom/ui/qml/ImageGallery/ImageGallery.qml b/meshroom/ui/qml/ImageGallery/ImageGallery.qml index 1ded88b0..d710375b 100644 --- a/meshroom/ui/qml/ImageGallery/ImageGallery.qml +++ b/meshroom/ui/qml/ImageGallery/ImageGallery.qml @@ -39,6 +39,10 @@ Panel { property variant viewpoints: currentCameraInit ? currentCameraInit.attribute('viewpoints').value : undefined property variant intrinsics: currentCameraInit ? currentCameraInit.attribute('intrinsics').value : undefined property bool readOnly: root.readOnly || displayHDR.checked + + onViewpointsChanged: { + ThumbnailCache.clearRequests(); + } } property variant parsedIntrinsic