diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp index 8e2b0aa68..d418e3ced 100644 --- a/profile-widget/divecartesianaxis.cpp +++ b/profile-widget/divecartesianaxis.cpp @@ -311,7 +311,6 @@ void DiveCartesianAxis::animateChangeLine(const QRectF &rectIn, int animSpeed) break; } updateTicks(animSpeed); - sizeChanged(); } double DiveCartesianAxis::Transform::to(double x) const diff --git a/profile-widget/divecartesianaxis.h b/profile-widget/divecartesianaxis.h index 2d9115cba..d9edd4277 100644 --- a/profile-widget/divecartesianaxis.h +++ b/profile-widget/divecartesianaxis.h @@ -52,9 +52,6 @@ public: double width() const; // only for vertical axes double height() const; // only for horizontal axes -signals: - void sizeChanged(); - protected: Position position; int fractionalDigits; diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index 3ad5765ab..f756e2f33 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -27,10 +27,7 @@ DiveEventItem::DiveEventItem(const struct dive *d, struct event *ev, struct gasm setupPixmap(lastgasmix, pixmaps); setupToolTipString(lastgasmix); - recalculatePos(0); - - connect(vAxis, &DiveCartesianAxis::sizeChanged, this, - [speed, this] { recalculatePos(speed); }); + recalculatePos(); } DiveEventItem::~DiveEventItem() @@ -228,7 +225,7 @@ bool DiveEventItem::shouldBeHidden() return false; } -void DiveEventItem::recalculatePos(int speed) +void DiveEventItem::recalculatePos() { if (!ev) return; @@ -238,10 +235,7 @@ void DiveEventItem::recalculatePos(int speed) return; } setVisible(!shouldBeHidden()); - qreal x = hAxis->posAtValue(ev->time.seconds); - qreal y = vAxis->posAtValue(depth); - if (speed > 0) - Animations::moveTo(this, speed, x, y); - else - setPos(x, y); + double x = hAxis->posAtValue(ev->time.seconds); + double y = vAxis->posAtValue(depth); + setPos(x, y); } diff --git a/profile-widget/diveeventitem.h b/profile-widget/diveeventitem.h index 2ddabade5..82e1773fb 100644 --- a/profile-widget/diveeventitem.h +++ b/profile-widget/diveeventitem.h @@ -24,13 +24,11 @@ public: bool shouldBeHidden(); static bool isInteresting(const struct dive *d, const struct divecomputer *dc, const struct event *ev, const struct plot_info &pi); -public -slots: - void recalculatePos(int animationSpeed); private: void setupToolTipString(struct gasmix lastgasmix); void setupPixmap(struct gasmix lastgasmix, const DivePixmaps &pixmaps); + void recalculatePos(); DiveCartesianAxis *vAxis; DiveCartesianAxis *hAxis; struct event *ev;