subsurface/profile-widget
Berthold Stoeger 27810f3217 profile: remove model parameter from TankItem::setData()
This one is extremely obscure: TankItem::setData(), which is
called on every replot, was passed the DivePlotDataModel,
even though it doesn't access that model at all.

Instead, it connect()s to the model to stay informed of changes
to the data. First of all, this should obviously be done
once in the constructor, not on every replot.

But also, the setData() function is called on every replot
one lines before sending the model-changed signal.
Thus, the tankitem was always repainted twice.

Just remove the whole connect() thing and go for a more
deterministic model. Should the tankbar not be repainted
anywhere, add the appropriate calls there.

Accordingly rename the "modelDataChanged" slot to "replot".

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-10 15:57:39 -08:00
..
animationfunctions.cpp Profile: add speed parameter to Animation::* functions 2019-07-12 09:59:28 +02:00
animationfunctions.h Profile: add speed parameter to Animation::* functions 2019-07-12 09:59:28 +02:00
CMakeLists.txt profile: move DiveHandler to profile-widget folder 2020-12-12 15:52:40 -08:00
divecartesianaxis.cpp cleanup: make DiveCartesianAxis functions const 2021-01-10 15:57:39 -08:00
divecartesianaxis.h cleanup: make DiveCartesianAxis functions const 2021-01-10 15:57:39 -08:00
diveeventitem.cpp cleanup: split out divecomputer functions from dive.c 2020-10-25 13:59:52 -07:00
diveeventitem.h Profile: take int instead of bool in DiveEventItem::recalculatePos 2019-07-12 09:59:28 +02:00
divehandler.cpp profile: move DiveHandler to profile-widget folder 2020-12-12 15:52:40 -08:00
divehandler.h profile: move DiveHandler to profile-widget folder 2020-12-12 15:52:40 -08:00
divelineitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divelineitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divepixmapitem.cpp profile: move picture removal from DivePictureItem to ProfileWidget2 2020-12-19 20:19:51 +01:00
divepixmapitem.h profile: move picture removal from DivePictureItem to ProfileWidget2 2020-12-19 20:19:51 +01:00
diveprofileitem.cpp profile: remove AbstractProfilePolygonItem::settingsChanged() 2021-01-10 15:57:39 -08:00
diveprofileitem.h profile: remove AbstractProfilePolygonItem::settingsChanged() 2021-01-10 15:57:39 -08:00
diverectitem.cpp Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
diverectitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetextitem.cpp Cleanup: move error reporting function declarations to errorhelper.h 2019-08-08 16:26:30 -07:00
divetextitem.h Add SPDX header to profile widgets 2017-04-29 13:32:55 -07:00
divetooltipitem.cpp statistics: use RoundRectItem for legend and info-box 2021-01-03 13:56:05 -08:00
divetooltipitem.h ui: create a RoundRectItem class 2021-01-03 13:56:05 -08:00
profilewidget2.cpp profile: remove model parameter from TankItem::setData() 2021-01-10 15:57:39 -08:00
profilewidget2.h profile: collect dive-profile items in a vector 2021-01-10 15:57:39 -08:00
qmlprofile.cpp mobile/profile: listen to dive changes and redraw profile 2020-12-21 13:12:37 -08:00
qmlprofile.h mobile/profile: listen to dive changes and redraw profile 2020-12-21 13:12:37 -08:00
ruleritem.cpp preferences: create global settingsChanged signal 2020-12-12 15:52:40 -08:00
ruleritem.h cleanup: turn protected into private members 2020-04-13 17:18:37 -07:00
tankitem.cpp profile: remove model parameter from TankItem::setData() 2021-01-10 15:57:39 -08:00
tankitem.h profile: remove model parameter from TankItem::setData() 2021-01-10 15:57:39 -08:00