mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
When editing multiple files, don't override existing equipment entries
This parallels the logic used for all the string entries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d2d4364afc
commit
50f6c6d8bc
1 changed files with 4 additions and 4 deletions
8
info.c
8
info.c
|
@ -473,12 +473,12 @@ void update_equipment_data(struct dive *dive, struct dive *master)
|
|||
{
|
||||
if (dive == master)
|
||||
return;
|
||||
if (memcmp(remember_cyl, master->cylinder, sizeof(cylinder_t) * MAX_CYLINDERS)) {
|
||||
if (memcmp(remember_cyl, master->cylinder, sizeof(cylinder_t) * MAX_CYLINDERS) &&
|
||||
cylinder_none(dive->cylinder))
|
||||
memcpy(dive->cylinder, master->cylinder, sizeof(cylinder_t) * MAX_CYLINDERS);
|
||||
}
|
||||
if (memcmp(remember_ws, master->weightsystem, sizeof(weightsystem_t) * MAX_WEIGHTSYSTEMS)) {
|
||||
if (memcmp(remember_ws, master->weightsystem, sizeof(weightsystem_t) * MAX_WEIGHTSYSTEMS) &&
|
||||
weightsystem_none(dive->weightsystem))
|
||||
memcpy(dive->weightsystem, master->weightsystem, sizeof(weightsystem_t) * MAX_WEIGHTSYSTEMS);
|
||||
}
|
||||
}
|
||||
|
||||
int edit_multi_dive_info(int nr, int *indices)
|
||||
|
|
Loading…
Add table
Reference in a new issue