diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-09-17 16:56:58 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-17 08:56:25 -0700 |
commit | d0145621a1d6a76922cc271208e07ed5827a6590 (patch) | |
tree | 1cafd5ac0cfc8ea124d78872cebd67ca964bfbae /dive.c | |
parent | 2d376de68ddde1bfc159f0e182120c1e8bc62610 (diff) | |
download | subsurface-d0145621a1d6a76922cc271208e07ed5827a6590.tar.gz |
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>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |