summaryrefslogtreecommitdiffstats
path: root/commands/command_base.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-01 11:30:50 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2020-05-01 21:44:50 +0200
commitf4b948e80d15f986887e647ff4e20de9e0d6453d (patch)
tree17f6e1159978a829877d237b1400b65beb0b0429 /commands/command_base.cpp
parent9c70261c0e294d46d62d99725a1ae9ddc01eb1cf (diff)
downloadsubsurface-f4b948e80d15f986887e647ff4e20de9e0d6453d.tar.gz
profile: properly update lastgasmix when populating events
When populating the events of a profile, a pointer to the current gasmix was passed around to properly calculate isobaric_counterdiffusion. The DiveEventItem::setupToolTipString() function updated this gasmix when processing gas change events. I inadvertently broke the code when replacing gasmix-pointers by values. We could of course simply revert this part of the commit. However, the data flow was horrible anyway: for example is supposed that the setup functions were called in the correct order (i.e. DiveEventItem::setupToolTipString() is called after all other functions using the gasmix). Not exactly easy to follow. Therefore, keep passing around the gasmix as value to make it clear that the functions don't modify it. Keep the gasmix up-to-date at the caller's site in ProfileWidget2::plotDive(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command_base.cpp')
0 files changed, 0 insertions, 0 deletions