aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-29 20:10:29 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-29 20:10:29 -0400
commit1b8ac21f6be42d777f38d1cf921bcadcb11f82f8 (patch)
treec6a50778e5f3d311b187eab269f3899fa7e068b3 /qt-ui/locationinformation.cpp
parentb1a929260f091a0a94c6aa46d12f7324c5920331 (diff)
downloadsubsurface-1b8ac21f6be42d777f38d1cf921bcadcb11f82f8.tar.gz
Correctly handle updating the name of dive sites from GPS
If the user downloaded the GPS data from the Subsurface webservice before naming a dive site, we run into a special case where entering a new name for a dive location should just update the name of the automatically named site which already has the correct GPS information. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 623a463c5..ea735752a 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -310,6 +310,10 @@ QVariant DiveLocationModel::data(const QModelIndex &index, int role) const
case Qt::DisplayRole:
return new_ds_value[index.row()];
case Qt::ToolTipRole:
+ if (same_string(displayed_dive_site.notes,"SubsurfaceWebservice"))
+ return "Update dive site name";
+ else
+ return "Create a new dive site";
return "Create a new dive site";
case Qt::DecorationRole:
return plusIcon;