From 2dcc0a7d1ebf6435060168f343df2adb5f0abb3c Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 13 Mar 2019 20:10:22 +0100 Subject: 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 --- qt-models/divelocationmodel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-models') 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; } -- cgit v1.2.3-70-g09d2