diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-13 20:10:22 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 2dcc0a7d1ebf6435060168f343df2adb5f0abb3c (patch) | |
tree | 533995c902f5dc6a629ac606c08a8b3db834d525 /qt-models/divelocationmodel.cpp | |
parent | 0fd85832b7f628d1bb6d308c11b5e53ea1e9f65b (diff) | |
download | subsurface-2dcc0a7d1ebf6435060168f343df2adb5f0abb3c.tar.gz |
Undo: implement undo of dive site description editing
Simply duplicate the code of dive site name editing. Split out
the common functionality that swaps a C and a Qt string.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelocationmodel.cpp')
-rw-r--r-- | qt-models/divelocationmodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index ae3baf9df..03b5f20fe 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -234,6 +234,9 @@ bool DiveSiteSortedModel::setData(const QModelIndex &index, const QVariant &valu case LocationInformationModel::NAME: Command::editDiveSiteName(ds, value.toString()); return true; + case LocationInformationModel::DESCRIPTION: + Command::editDiveSiteDescription(ds, value.toString()); + return true; default: return false; } |