aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-11-24 12:31:35 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-09 20:58:04 -0800
commit517fb7a462c207e32cc7c5ed50e1e9b1f359dbd8 (patch)
tree2ce9dd590f60743f5f565af320ea77c474c2e1c4 /mobile-widgets/qmlmanager.cpp
parent54fcda4c32029c1afd9eb02fb0c4a5e1949da175 (diff)
downloadsubsurface-517fb7a462c207e32cc7c5ed50e1e9b1f359dbd8.tar.gz
Core: keep trips in table(s)
Currently, all trips are kept in a linked list. Replace the list by a table in analogy to dive_table. Use this to keep the trip_table sorted as suggested by dump_trip_list(). When inserting a trip into the table do that after adding the dives, to avoid warnings coming out of dump_trip_list(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index cdcbedecf..75d44deb1 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1131,6 +1131,7 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q
// we know that the only thing that might happen in a resort is that
// this one dive moves to a different spot in the dive list
sort_dive_table(&dive_table);
+ sort_trip_table(&trip_table);
int newIdx = get_idx_by_uniq_id(d->id);
if (newIdx != oldIdx) {
DiveListModel::instance()->removeDive(modelIdx);