mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Do not reorder pictures when saving
When one has 2 pictures with the same timestamp, these pictures are reordered on saving (requires something changed on the specific dive for the save to actually trigger). This patch keeps the picture order intact in the XML log. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b71ee970db
commit
bbc3a0e55f
1 changed files with 1 additions and 1 deletions
2
dive.c
2
dive.c
|
@ -2870,7 +2870,7 @@ void dive_add_picture(struct dive *d, struct picture *newpic)
|
|||
{
|
||||
struct picture **pic_ptr = &d->picture_list;
|
||||
/* let's keep the list sorted by time */
|
||||
while (*pic_ptr && (*pic_ptr)->offset.seconds < newpic->offset.seconds)
|
||||
while (*pic_ptr && (*pic_ptr)->offset.seconds <= newpic->offset.seconds)
|
||||
pic_ptr = &(*pic_ptr)->next;
|
||||
newpic->next = *pic_ptr;
|
||||
*pic_ptr = newpic;
|
||||
|
|
Loading…
Reference in a new issue