summaryrefslogtreecommitdiffstats
path: root/commands/command_edit.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-12-12 23:07:17 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-20 15:20:44 -0700
commit4e47cdfa2c611e0e02f46b84d76d29f1fab74e20 (patch)
treeec7de6591f918f7fb6b73f2b89f41d4b9ee1a1d1 /commands/command_edit.cpp
parent329641fdcdf7759d430aea2d2a115550bc5caf62 (diff)
downloadsubsurface-4e47cdfa2c611e0e02f46b84d76d29f1fab74e20.tar.gz
Undo: implement invalidate-dive command
Connect command to context menu. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command_edit.cpp')
-rw-r--r--commands/command_edit.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp
index 7fd56e0d2..a880f9f2f 100644
--- a/commands/command_edit.cpp
+++ b/commands/command_edit.cpp
@@ -574,6 +574,27 @@ DiveField EditMode::fieldId() const
return DiveField::MODE;
}
+// ***** Invalid *****
+void EditInvalid::set(struct dive *d, int invalid) const
+{
+ d->invalid = invalid;
+}
+
+int EditInvalid::data(struct dive *d) const
+{
+ return d->invalid;
+}
+
+QString EditInvalid::fieldName() const
+{
+ return tr("invalid");
+}
+
+DiveField EditInvalid::fieldId() const
+{
+ return DiveField::INVALID;
+}
+
// ***** Tag based commands *****
EditTagsBase::EditTagsBase(const QStringList &newListIn, bool currentDiveOnly) :
EditDivesBase(currentDiveOnly),