mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
devices: create device nodes in parsers
So far, we added a non-global device table to the parser states. Now, create device nodes in that table instead of in the global table. Thus, on undo of dive-import, the new device nodes will be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
255f561aff
commit
8c65558b5c
6 changed files with 23 additions and 14 deletions
|
|
@ -361,9 +361,9 @@ int parse_file(const char *filename, struct dive_table *table, struct trip_table
|
|||
wl_name = strcat(wl_name, ".add");
|
||||
if((ret = readfile(wl_name, &wl_mem)) < 0) {
|
||||
fprintf(stderr, "No file %s found. No WLog extensions.\n", wl_name);
|
||||
ret = datatrak_import(&mem, NULL, table, trips, sites);
|
||||
ret = datatrak_import(&mem, NULL, table, trips, sites, devices);
|
||||
} else {
|
||||
ret = datatrak_import(&mem, &wl_mem, table, trips, sites);
|
||||
ret = datatrak_import(&mem, &wl_mem, table, trips, sites, devices);
|
||||
free(wl_mem.buffer);
|
||||
}
|
||||
free(mem.buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue