aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-18 13:34:05 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-18 13:34:05 -0700
commitbd4629b293e165c9fb8ba0c83ed1ff5016d2da94 (patch)
treee7fc7ea36e553cefa7d136fdaf29b9ba7f0a9a92 /qt-ui/modeldelegates.cpp
parent021a151f0382e8b8cace463969bc9c3607661527 (diff)
downloadsubsurface-bd4629b293e165c9fb8ba0c83ed1ff5016d2da94.tar.gz
Add nr of dives at the site to completion string
I'm not convinced that this is useful enough to keep, but let's give it a try and see what people think. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r--qt-ui/modeldelegates.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index 4078621ab..6f792398f 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -542,7 +542,9 @@ void LocationFilterDelegate::paint(QPainter *painter, const QStyleOptionViewItem
} else {
int distanceMeters = get_distance(ds->latitude, ds->longitude, displayed_dive_site.latitude, displayed_dive_site.longitude);
QString distance = distance_string(distanceMeters);
- bottomText += tr(" (~%1 away)").arg(distance);
+ int nr = nr_of_dives_at_dive_site(ds->uuid, false);
+ bottomText += tr(" (~%1 away").arg(distance);
+ bottomText += tr(", %n dive(s) here)", 0, nr);
}
}
if (bottomText.isEmpty()) {