mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Show trip date (with number of dives) in dive/trip list
That was easy :-) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b7797140b
commit
e6ec626c97
1 changed files with 9 additions and 7 deletions
|
@ -404,13 +404,15 @@ QVariant TripItem::data(int column, int role) const
|
|||
{
|
||||
QVariant ret;
|
||||
|
||||
if (column != LOCATION) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (role) {
|
||||
case Qt::DisplayRole:
|
||||
ret = QString(trip->location);
|
||||
if (role == Qt::DisplayRole) {
|
||||
switch (column) {
|
||||
case LOCATION:
|
||||
ret = QString(trip->location);
|
||||
break;
|
||||
case DATE:
|
||||
ret = QString(get_trip_date_string(trip->when, trip->nrdives));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue