From a88ab64cf80db7bde3e14ac41acf1ed2d73dbdf1 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 12 Jan 2020 08:40:20 +0800 Subject: divetripmodel: introduce CURRENT_ROLE Use this role to test whether a dive is the currently displayed dive. This will be needed to transport changes of the current dive to the mobile list models. Signed-off-by: Berthold Stoeger --- qt-models/divetripmodel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-models/divetripmodel.cpp') diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index ce4206cfb..5b7f96ba1 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -255,6 +255,8 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role) return get_divenr(d); case SELECTED_ROLE: return d->selected; + case CURRENT_ROLE: + return d == current_dive; } return QVariant(); } -- cgit v1.2.3-70-g09d2