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 /desktop-widgets/locationinformation.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 'desktop-widgets/locationinformation.cpp')
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 0da3e12ee..747a2d183 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -131,6 +131,10 @@ void LocationInformationWidget::diveSiteChanged(struct dive_site *ds, int field) switch (field) { case LocationInformationModel::NAME: ui.diveSiteName->setText(diveSite->name); + return; + case LocationInformationModel::DESCRIPTION: + ui.diveSiteDescription->setText(diveSite->description); + return; default: return; } |