mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Hash images upon loading divelog file rather than when loading image
Up to now, we only computed hashes of images upon actually displaying the images. With this patch we start to compute hashes once we load the xml or from git. This happens in the background, so the user should note an increased CPU load only once per divelog. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2d376de68d
commit
d0145621a1
4 changed files with 20 additions and 0 deletions
2
dive.c
2
dive.c
|
|
@ -9,6 +9,7 @@
|
|||
#include "libdivecomputer.h"
|
||||
#include "device.h"
|
||||
#include "divelist.h"
|
||||
#include "qthelperfromc.h"
|
||||
|
||||
/* one could argue about the best place to have this variable -
|
||||
* it's used in the UI, but it seems to make the most sense to have it
|
||||
|
|
@ -3014,6 +3015,7 @@ void dive_add_picture(struct dive *dive, struct picture *newpic)
|
|||
pic_ptr = &(*pic_ptr)->next;
|
||||
newpic->next = *pic_ptr;
|
||||
*pic_ptr = newpic;
|
||||
cache_picture(newpic);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue