mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: unserialize loading of pictures
The images to load are kept in a set to avoid multiple loading of the same picture. The set was protected with a mutex. Problem: the mutex was not released before loading the picture, effectively serializing the loading of pictures. Therefore unlock the mutex once the set is updated. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4c84c0baf1
commit
fe133e2cca
1 changed files with 2 additions and 0 deletions
|
@ -89,6 +89,8 @@ static void loadPicture(struct picture *picture, bool fromHash)
|
|||
if (queuedPictures.contains(QString(picture->filename)))
|
||||
return;
|
||||
queuedPictures.insert(QString(picture->filename));
|
||||
locker.unlock();
|
||||
|
||||
ImageDownloader download(picture);
|
||||
download.load(fromHash);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue