summaryrefslogtreecommitdiffstats
path: root/qt-models/divelistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r--qt-models/divelistmodel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index 837b75f14..7b7102f7b 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -338,9 +338,12 @@ QHash<int, QByteArray> DiveListModel::roleNames() const
return roles;
}
-void DiveListModel::clearDives()
+void DiveListModel::startAddDive()
{
- m_dives.clear();
+ struct dive *d;
+ d = alloc_dive();
+ add_single_dive(get_divenr(d), d);
+ addDive(d);
}
DiveListModel *DiveListModel::instance()