mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Enable removal of pictures from different dives at the same moment
Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
7bc77947f6
commit
82170579ad
3 changed files with 12 additions and 4 deletions
|
@ -3838,9 +3838,10 @@ struct picture *clone_picture(struct picture *src)
|
|||
return dst;
|
||||
}
|
||||
|
||||
void dive_remove_picture(char *filename)
|
||||
// Return true if picture was found and deleted
|
||||
bool dive_remove_picture(struct dive *d, char *filename)
|
||||
{
|
||||
struct picture **picture = ¤t_dive->picture_list;
|
||||
struct picture **picture = &d->picture_list;
|
||||
while (*picture && !same_string((*picture)->filename, filename))
|
||||
picture = &(*picture)->next;
|
||||
if (*picture) {
|
||||
|
@ -3848,7 +3849,9 @@ void dive_remove_picture(char *filename)
|
|||
picture_free(*picture);
|
||||
*picture = temp;
|
||||
invalidate_dive_cache(current_dive);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* this always acts on the current divecomputer of the current dive */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue