mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
CSV import: import time field if available
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f1a24f08fb
commit
51b7de7812
2 changed files with 16 additions and 3 deletions
|
|
@ -714,6 +714,8 @@ int DiveLogImportDialog::setup_csv_params(QStringList r, char **params, int pnr)
|
|||
params[pnr++] = intdup(r.indexOf(tr("Date")));
|
||||
params[pnr++] = strdup("datefmt");
|
||||
params[pnr++] = intdup(ui->DateFormat->currentIndex());
|
||||
params[pnr++] = strdup("starttimeField");
|
||||
params[pnr++] = intdup(r.indexOf(tr("Time")));
|
||||
params[pnr++] = strdup("timeField");
|
||||
params[pnr++] = intdup(r.indexOf(tr("Sample time")));
|
||||
params[pnr++] = strdup("depthField");
|
||||
|
|
@ -815,7 +817,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
|
|||
sample->tts.seconds *= 60;
|
||||
}
|
||||
} else {
|
||||
char *params[43];
|
||||
char *params[45];
|
||||
int pnr = 0;
|
||||
|
||||
pnr = setup_csv_params(r, params, pnr);
|
||||
|
|
@ -882,7 +884,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
|
|||
|
||||
parse_manual_file(fileNames[i].toUtf8().data(), params, pnr - 1);
|
||||
} else {
|
||||
char *params[43];
|
||||
char *params[45];
|
||||
int pnr = 0;
|
||||
|
||||
pnr = setup_csv_params(r, params, pnr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue