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
|
@ -830,7 +830,8 @@ static void try_to_fill_dc(struct divecomputer *dc, const char *name, char *buf,
|
|||
if (MATCH("model", utf8_string, &dc->model))
|
||||
return;
|
||||
if (MATCH("deviceid", hex_value, &deviceid)) {
|
||||
set_dc_deviceid(dc, deviceid, &device_table);
|
||||
set_dc_deviceid(dc, deviceid, &device_table); // prefer already known serial/firmware over those from the loaded log
|
||||
set_dc_deviceid(dc, deviceid, state->devices);
|
||||
return;
|
||||
}
|
||||
if (MATCH("diveid", hex_value, &dc->diveid))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue