Import: Move the Import of .FIT Files to 'Import log files'

Move the import of .FIT files into the 'Import log files' menu item,
where most people will be looking for it. This also naturally opens a
file selection dialog, which is more intuitive than having to select
this in the dive computer import dialog.
Also fix a bug affecting file imports if the log files contain
coordinates - the dive log needs to be set in the import data structure.
And refactor the file dialog file filters to make it more natural to add
more entries.

Requires https://github.com/subsurface/libdc/pull/72 to work.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2025-01-01 16:50:21 +13:00
parent feb70907e5
commit 5889c1a3f8
12 changed files with 77 additions and 72 deletions

View file

@ -482,6 +482,7 @@ int logtrak_import(const std::string &mem, struct divelog *log)
*ltd_gf_high = NULL, *ltd_log_id = NULL, *ltd_airtemp = NULL;
auto lt_dive = std::make_unique<dive>();
auto devdata = std::make_unique<device_data_t>();
devdata->log = log;
dive_count++;
Lt_String ltd_notes;
int rc;