diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-09-22 18:50:10 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-02 08:04:49 -0700 |
commit | 30b384cebd3d488c24c211ccbb4511566d00d4f1 (patch) | |
tree | 17756cd357cf2725104e15c2b95eccbefc2ad0fc /qt-models/diveimportedmodel.h | |
parent | ad7ffa0af03718829c62621aceaaac959932ac14 (diff) | |
download | subsurface-30b384cebd3d488c24c211ccbb4511566d00d4f1.tar.gz |
Import: keep model state consistent when deleting unselected dives
In DiveImportedModel::deleteDeselected(), unselected dives were
deleted from the dive-table. But this left the model in an
inconsistent state and the frontend was not informed of the
missing dives.
Fix this by invoking the appropriate beginRemoveRows()/
endRemoveRows() pairs. Move the functionality into its
own function so that it can be reused by the desktop version.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/diveimportedmodel.h')
-rw-r--r-- | qt-models/diveimportedmodel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-models/diveimportedmodel.h b/qt-models/diveimportedmodel.h index 49cbdf10c..5f2575bce 100644 --- a/qt-models/diveimportedmodel.h +++ b/qt-models/diveimportedmodel.h @@ -21,6 +21,7 @@ public: Qt::ItemFlags flags(const QModelIndex &index) const; Q_INVOKABLE void clearTable(); QHash<int, QByteArray> roleNames() const; + void deleteDeselected(); Q_INVOKABLE void recordDives(); Q_INVOKABLE void startDownload(); |