summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/diveprofileitem.cpp21
-rw-r--r--profile-widget/diveprofileitem.h6
2 files changed, 1 insertions, 26 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index c6df6ee50..138dbbc49 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -820,8 +820,7 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
}
DiveCalculatedCeiling::DiveCalculatedCeiling(ProfileWidget2 *widget) :
- profileWidget(widget),
- is3mIncrement(false)
+ profileWidget(widget)
{
connect(qPrefTechnicalDetails::instance(), &qPrefTechnicalDetails::calcceilingChanged, this, &DiveCalculatedCeiling::setVisible);
setVisible(prefs.calcceiling);
@@ -830,8 +829,6 @@ DiveCalculatedCeiling::DiveCalculatedCeiling(ProfileWidget2 *widget) :
void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
- connect(profileWidget, SIGNAL(dateTimeChangedItems()), this, SLOT(recalc()), Qt::UniqueConnection);
-
// We don't have enougth data to calculate things, quit.
if (!shouldCalculateStuff(topLeft, bottomRight))
return;
@@ -914,22 +911,6 @@ void DiveReportedCeiling::modelDataChanged(const QModelIndex &topLeft, const QMo
setBrush(pat);
}
-void DiveCalculatedCeiling::recalc()
-{
-#ifndef SUBSURFACE_MOBILE
- dataModel->calculateDecompression();
-#endif
-}
-
-void DiveCalculatedCeiling::settingsChanged()
-{
- if (dataModel && is3mIncrement != prefs.calcceiling3m) {
- // recalculate that part.
- recalc();
- }
- is3mIncrement = prefs.calcceiling3m;
-}
-
void DiveReportedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
if (polygon().isEmpty())
diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h
index df46b6e12..58e16190b 100644
--- a/profile-widget/diveprofileitem.h
+++ b/profile-widget/diveprofileitem.h
@@ -177,15 +177,9 @@ public:
DiveCalculatedCeiling(ProfileWidget2 *profileWidget);
void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
- void settingsChanged() override;
-
-public
-slots:
- void recalc();
private:
ProfileWidget2 *profileWidget;
- bool is3mIncrement;
};
class DiveReportedCeiling : public AbstractProfilePolygonItem {