Profile: take int instead of bool in DiveEventItem::recalculatePos

The goal here is to slowly make animation speed a variable of the
profile widget, not of the global preferences. Currently the code
does some trickeries with setting / unsetting the global animation
speed.

Start by not taking a bool "instant" but a speed in
DiveEventItem::recalculatePos().

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-07-10 21:57:51 +02:00 committed by Robert C. Helling
parent 5886550434
commit 74244b3cfe
3 changed files with 12 additions and 11 deletions

View file

@ -788,7 +788,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
#endif
DiveEventItem *item = new DiveEventItem();
item->setHorizontalAxis(timeAxis);
item->setVerticalAxis(profileYAxis);
item->setVerticalAxis(profileYAxis, qPrefDisplay::animation_speed());
item->setModel(dataModel);
item->setEvent(event, lastgasmix);
item->setZValue(2);