summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelogimportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-05-02 20:11:37 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-05-02 10:25:10 -0700
commit304af311f0a341ccbc1da1ca85a2847f592be4d9 (patch)
tree66bd9fa1b2d6c31a247ee964553273eab8fddea6 /desktop-widgets/divelogimportdialog.cpp
parent7ec83ef02a7216bd2de19798d250df8540b90b38 (diff)
downloadsubsurface-304af311f0a341ccbc1da1ca85a2847f592be4d9.tar.gz
CSV import: import dive number if defined
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/divelogimportdialog.cpp')
-rw-r--r--desktop-widgets/divelogimportdialog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp
index 90a466c9a..af1f26e2c 100644
--- a/desktop-widgets/divelogimportdialog.cpp
+++ b/desktop-widgets/divelogimportdialog.cpp
@@ -724,6 +724,8 @@ int DiveLogImportDialog::setup_csv_params(QStringList r, char **params, int pnr)
params[pnr++] = intdup(ui->DateFormat->currentIndex());
params[pnr++] = strdup("starttimeField");
params[pnr++] = intdup(r.indexOf(tr("Time")));
+ params[pnr++] = strdup("numberField");
+ params[pnr++] = intdup(r.indexOf(tr("Dive #")));
params[pnr++] = strdup("timeField");
params[pnr++] = intdup(r.indexOf(tr("Sample time")));
params[pnr++] = strdup("depthField");
@@ -825,7 +827,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
sample->tts.seconds *= 60;
}
} else {
- char *params[45];
+ char *params[47];
int pnr = 0;
pnr = setup_csv_params(r, params, pnr);
@@ -892,7 +894,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
parse_manual_file(fileNames[i].toUtf8().data(), params, pnr - 1);
} else {
- char *params[45];
+ char *params[47];
int pnr = 0;
pnr = setup_csv_params(r, params, pnr);