summaryrefslogtreecommitdiffstats
path: root/qt-models/divelistmodel.cpp
diff options
context:
space:
mode:
authorGravatar Grace Karanja <gracie.karanja89@gmail.com>2015-08-12 15:01:39 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-31 15:24:14 -0700
commita3bdf49b84d8a30a22e05bc965e98f5e7914f637 (patch)
treea600baf129c53023ad061b8d55eda6308b60bed6 /qt-models/divelistmodel.cpp
parent8d03d264807930b110f3f3f62f5fd42887f80e3e (diff)
downloadsubsurface-a3bdf49b84d8a30a22e05bc965e98f5e7914f637.tar.gz
QML UI: Clear divelist model before starting new dive
When user clicks on AddDive, we should clear the model. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Diffstat (limited to 'qt-models/divelistmodel.cpp')
-rw-r--r--qt-models/divelistmodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index 4019bee8b..837b75f14 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -338,6 +338,11 @@ QHash<int, QByteArray> DiveListModel::roleNames() const
return roles;
}
+void DiveListModel::clearDives()
+{
+ m_dives.clear();
+}
+
DiveListModel *DiveListModel::instance()
{
return m_instance;