subsurface/profile-widget
Berthold Stoeger f4b948e80d 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>
2020-05-01 21:44:50 +02:00
..
animationfunctions.cpp
animationfunctions.h
CMakeLists.txt
divecartesianaxis.cpp
divecartesianaxis.h cleanup: turn protected into private members 2020-04-13 17:18:37 -07:00
diveeventitem.cpp profile: properly update lastgasmix when populating events 2020-05-01 21:44:50 +02:00
diveeventitem.h
divelineitem.cpp
divelineitem.h
divepixmapitem.cpp
divepixmapitem.h cleanup: turn protected into private members 2020-04-13 17:18:37 -07:00
diveprofileitem.cpp
diveprofileitem.h cleanup: turn protected into private members 2020-04-13 17:18:37 -07:00
diverectitem.cpp
diverectitem.h
divetextitem.cpp
divetextitem.h
divetooltipitem.cpp
divetooltipitem.h
profilewidget2.cpp profile: properly update lastgasmix when populating events 2020-05-01 21:44:50 +02:00
profilewidget2.h
qmlprofile.cpp
qmlprofile.h
ruleritem.cpp
ruleritem.h cleanup: turn protected into private members 2020-04-13 17:18:37 -07:00
tankitem.cpp
tankitem.h