From 88dc32fdfcb7cb63b0e47280d1f38395077df757 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 14 Apr 2019 15:37:19 +0200 Subject: 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 --- qt-models/divelistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-models') 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); } -- cgit v1.2.3-70-g09d2