diff options
author | Grace Karanja <gracie.karanja89@gmail.com> | 2015-08-12 15:01:39 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-31 15:24:14 -0700 |
commit | a3bdf49b84d8a30a22e05bc965e98f5e7914f637 (patch) | |
tree | a600baf129c53023ad061b8d55eda6308b60bed6 /qt-models/divelistmodel.cpp | |
parent | 8d03d264807930b110f3f3f62f5fd42887f80e3e (diff) | |
download | subsurface-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.cpp | 5 |
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; |