From bd4629b293e165c9fb8ba0c83ed1ff5016d2da94 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 18 Jul 2015 13:34:05 -0700 Subject: 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 --- qt-ui/modeldelegates.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-ui') 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()) { -- cgit v1.2.3-70-g09d2