summaryrefslogtreecommitdiffstats
path: root/qt-models/diveimportedmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/diveimportedmodel.cpp')
-rw-r--r--qt-models/diveimportedmodel.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/qt-models/diveimportedmodel.cpp b/qt-models/diveimportedmodel.cpp
index 781cd72c6..c1f4f7525 100644
--- a/qt-models/diveimportedmodel.cpp
+++ b/qt-models/diveimportedmodel.cpp
@@ -143,6 +143,17 @@ void DiveImportedModel::repopulate()
setImportedDivesIndexes(0, diveTable->nr-1);
}
+void DiveImportedModel::recordDives()
+{
+ for (int i = 0; i < rowCount(); i++) {
+ if (diveTable->dives[i] && checkStates[i]) {
+ record_dive(diveTable->dives[i]);
+ diveTable->dives[i] = NULL;
+ }
+ }
+ diveTable->nr = 0;
+}
+
QHash<int, QByteArray> DiveImportedModel::roleNames() const {
static QHash<int, QByteArray> roles = {
{ DateTime, "datetime"},