From 4e47cdfa2c611e0e02f46b84d76d29f1fab74e20 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 12 Dec 2019 23:07:17 +0100 Subject: Undo: implement invalidate-dive command Connect command to context menu. Signed-off-by: Berthold Stoeger --- core/save-xml.c | 2 +- core/subsurface-qt/divelistnotifier.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/save-xml.c b/core/save-xml.c index 3570861e4..6662069d8 100644 --- a/core/save-xml.c +++ b/core/save-xml.c @@ -499,7 +499,7 @@ void save_one_dive_to_mb(struct membuffer *b, struct dive *dive, bool anonymize) if (dive->chill) put_format(b, " chill='%d'", dive->chill); if (dive->invalid) - put_format(b, " invalid"); + put_format(b, " invalid='1'"); save_tags(b, dive->tag_list); if (dive->dive_site) put_format(b, " divesiteid='%8x'", dive->dive_site->uuid); diff --git a/core/subsurface-qt/divelistnotifier.h b/core/subsurface-qt/divelistnotifier.h index 5ef25e832..f1b5da2c6 100644 --- a/core/subsurface-qt/divelistnotifier.h +++ b/core/subsurface-qt/divelistnotifier.h @@ -35,6 +35,7 @@ struct DiveField { unsigned int mode : 1; unsigned int notes : 1; unsigned int salinity : 1; + unsigned int invalid : 1; enum Flags { NONE = 0, NR = 1 << 0, @@ -57,7 +58,8 @@ struct DiveField { TAGS = 1 << 17, MODE = 1 << 18, NOTES = 1 << 19, - SALINITY = 1 << 20 + SALINITY = 1 << 20, + INVALID = 1 << 21 }; DiveField(int flags); }; -- cgit v1.2.3-70-g09d2