mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix trip summary line in dive list
Two errors fixed. - With no location set, the summary line would start with a ','. - When auto creating a trip for a manually added dive or when editing the dates of dives in a trip, the timestamp for the trip was not updated after editing the dive. Fixes #293 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
65e980d483
commit
6acff53735
4 changed files with 11 additions and 2 deletions
|
@ -929,7 +929,10 @@ QVariant TripItem::data(int column, int role) const
|
|||
if (role == Qt::DisplayRole) {
|
||||
switch (column) {
|
||||
case DiveTripModel::NR:
|
||||
ret = QString(trip->location) + ", " + get_trip_date_string(trip->when, trip->nrdives);
|
||||
if (trip->location && *trip->location)
|
||||
ret = QString(trip->location) + ", " + get_trip_date_string(trip->when, trip->nrdives);
|
||||
else
|
||||
ret = get_trip_date_string(trip->when, trip->nrdives);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue