summaryrefslogtreecommitdiffstats
path: root/core/dive.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-08 21:36:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-10 09:43:32 -0700
commit4489389a018d7099e6fd0019e4717dcf95bc08b5 (patch)
tree1e1316048f90d55bab967f57b74397c512e86278 /core/dive.c
parent3a74f650637e5e8e1ae71933cbfb6373147c0456 (diff)
downloadsubsurface-4489389a018d7099e6fd0019e4717dcf95bc08b5.tar.gz
undo: refine pasting of cylinders
When pasting cylinders, the destination dive got a verbatim copy of the cylinders of the source dive. This is not what users want: for example, the start and stop pressures from the dive computer as well as the gas mix may be overwritten. There seems to be no perfect solution, since some times users may want to paste the gas-mix. Therefore, let's choose a heuristic approach for now (in the future we might implement a UI-flag): When copying over existing cylinders, only copy type and maximum pressure. When adding new cylinders (i.e. from-dive has more cylinders than to-dive), copy everything, but reset start- and top-pressure to 0, which represents unkown. Moroever, in the latter case, set "manually added" to true, since obviously this wasn't added by a dive computer. Fixes #2676 Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
0 files changed, 0 insertions, 0 deletions