diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp index 9fd8fb9db..84815e59d 100644 --- a/profile-widget/divecartesianaxis.cpp +++ b/profile-widget/divecartesianaxis.cpp @@ -3,7 +3,6 @@ #include "profile-widget/divetextitem.h" #include "core/qthelper.h" #include "core/subsurface-string.h" -#include "core/subsurface-qt/divelistnotifier.h" #include "qt-models/diveplotdatamodel.h" #include "profile-widget/animationfunctions.h" #include "profile-widget/divelineitem.h" @@ -353,22 +352,11 @@ QColor DepthAxis::colorForValue(double) const return QColor(Qt::red); } -DepthAxis::DepthAxis(double fontPrintScale, ProfileScene &scene) : DiveCartesianAxis(fontPrintScale, scene), - unitSystem(prefs.units.length) +DepthAxis::DepthAxis(double fontPrintScale, ProfileScene &scene) : DiveCartesianAxis(fontPrintScale, scene) { - connect(&diveListNotifier, &DiveListNotifier::settingsChanged, this, &DepthAxis::settingsChanged); changed = true; } -void DepthAxis::settingsChanged() -{ - if (unitSystem == prefs.units.length) - return; - changed = true; - updateTicks(); - unitSystem = prefs.units.length; -} - QColor TimeAxis::colorForValue(double) const { return QColor(Qt::blue); @@ -401,7 +389,6 @@ PartialGasPressureAxis::PartialGasPressureAxis(const DivePlotDataModel &model, d DiveCartesianAxis(fontPrintScale, scene), model(model) { - connect(&diveListNotifier, &DiveListNotifier::settingsChanged, this, &PartialGasPressureAxis::update); } void PartialGasPressureAxis::update() diff --git a/profile-widget/divecartesianaxis.h b/profile-widget/divecartesianaxis.h index efb36fff6..a92aeb2b2 100644 --- a/profile-widget/divecartesianaxis.h +++ b/profile-widget/divecartesianaxis.h @@ -81,10 +81,6 @@ public: private: QString textForValue(double value) const override; QColor colorForValue(double value) const override; - units::LENGTH unitSystem; -private -slots: - void settingsChanged(); }; class TimeAxis : public DiveCartesianAxis { @@ -109,8 +105,6 @@ class PartialGasPressureAxis : public DiveCartesianAxis { Q_OBJECT public: PartialGasPressureAxis(const DivePlotDataModel &model, double fontPrintScale, ProfileScene &scene); -public -slots: void update(); private: const DivePlotDataModel &model;