summaryrefslogtreecommitdiffstats
path: root/commands/command_edit.cpp
diff options
context:
space:
mode:
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 701da3ee1..31ca4ea23 100644
--- a/commands/command_edit.cpp
+++ b/commands/command_edit.cpp
@@ -355,6 +355,27 @@ DiveField EditWaterTemp::fieldId() const
return DiveField::WATER_TEMP;
}
+// ***** Water Type *****
+void EditWaterTypeUser::set(struct dive *d, int value) const
+{
+ d->user_salinity = value > 0 ? value : 0;
+}
+
+int EditWaterTypeUser::data(struct dive *d) const
+{
+ return d->user_salinity;
+}
+
+QString EditWaterTypeUser::fieldName() const
+{
+ return tr("salinity");
+}
+
+DiveField EditWaterTypeUser::fieldId() const
+{
+ return DiveField::SALINITY;
+}
+
// ***** Atmospheric pressure *****
void EditAtmPress::set(struct dive *d, int value) const
{