[ui] clear thumbnail requests when changing viewpoints

This commit is contained in:
mugulmd 2023-01-17 07:11:32 -08:00
parent ae3184decc
commit dd235dcbf1
2 changed files with 12 additions and 0 deletions

View file

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