summaryrefslogtreecommitdiffstats
path: root/qt-models/divelistmodel.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-14 15:37:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-15 10:24:31 +1200
commit88dc32fdfcb7cb63b0e47280d1f38395077df757 (patch)
treed3d733d5da8923a5081a90cd87387216888e0df7 /qt-models/divelistmodel.cpp
parent5729f93e1f512aa9e68b0e01743152aaee2b7c12 (diff)
downloadsubsurface-88dc32fdfcb7cb63b0e47280d1f38395077df757.tar.gz
Core: turn add_single_dive() to append_dive()
The only external caller of add_single_dive() used it to append a dive to the global dive list. Rename the function accordingly and remove the index parameter. The internal caller can use the local insert_dive() function, which doesn't consider selection. That shouldn't be a problem, as the caller is doing import. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r--qt-models/divelistmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index 4d66c5406..b13c1fcc3 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -278,7 +278,7 @@ QString DiveListModel::startAddDive()
nr++;
d->number = nr;
d->dc.model = strdup("manually added dive");
- add_single_dive(dive_table.nr, d);
+ append_dive(d);
insertDive(get_idx_by_uniq_id(d->id), new DiveObjectHelper(d));
return QString::number(d->id);
}