From 6fe8cb652191728586f3731dcf6688b5a5b3efbb Mon Sep 17 00:00:00 2001 From: Maximilian Güntner Date: Sat, 2 Nov 2013 02:12:42 +0100 Subject: Replaced the tag implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new implementation supports custom tags which are provided by the user as well as default tags which are provided by subsurface. Default tags can be translated and will be written to XML in their non-localized form. Signed-off-by: Maximilian Güntner --- divelist.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'divelist.c') diff --git a/divelist.c b/divelist.c index 858d61533..28d082029 100644 --- a/divelist.c +++ b/divelist.c @@ -735,6 +735,11 @@ void delete_single_dive(int idx) free((void *)dive->buddy); if (dive->suit) free((void *)dive->suit); + if (dive->tag_list) { + taglist_clear(dive->tag_list); + /* Remove head of list */ + free((void *)dive->tag_list); + } free(dive); } @@ -800,8 +805,6 @@ void select_dive(int idx) struct dive *dive = get_dive(idx); if (dive) { /* never select an invalid dive that isn't displayed */ - if (dive->dive_tags & DTAG_INVALID && !prefs.display_invalid_dives) - return; if (!dive->selected) { dive->selected = 1; amount_selected++; -- cgit v1.2.3-70-g09d2