Append the dive mode as a tag that is seen by the filter tool.

This allows one to filter dives by divemode, e.g. by typing
"CCR" or "Open circuit" in the tags textbox of the filter tool.
Quite useful if one dives using more than one dive mode. For the
purpose of the filter tool only the dive mode attribute is added
to the list of tags for the specific dive being considered. The
tag list for the same dive (in the XML dive log) is not affected
in any way.

Provide for translation in alternative languages (Response to
bstoeger's suggestion).

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
willemferguson 2019-02-23 21:37:45 +02:00 committed by Dirk Hohndel
parent 22f98b0a16
commit 2cda456282

View file

@ -42,6 +42,7 @@ namespace {
if (tags.isEmpty()) if (tags.isEmpty())
return true; return true;
QStringList dive_tags = get_taglist_string(d->tag_list).split(","); QStringList dive_tags = get_taglist_string(d->tag_list).split(",");
dive_tags.append(gettextFromC::tr(divemode_text_ui[d->dc.divemode]));
return check(tags, dive_tags, mode); return check(tags, dive_tags, mode);
} }