mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: remove settings-changed slots in DiveCartesianAxis
The profile is fully redrawn anyway, there is no point in these redundant slots. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d9dcf9ef37
commit
d19b095db1
2 changed files with 1 additions and 20 deletions
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue