aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/divepixmapitem.cpp8
-rw-r--r--qt-ui/profile/divepixmapitem.h2
-rw-r--r--qt-ui/profile/profilewidget2.cpp1
3 files changed, 10 insertions, 1 deletions
diff --git a/qt-ui/profile/divepixmapitem.cpp b/qt-ui/profile/divepixmapitem.cpp
index d2f3a692a..dd002e5f1 100644
--- a/qt-ui/profile/divepixmapitem.cpp
+++ b/qt-ui/profile/divepixmapitem.cpp
@@ -1,6 +1,7 @@
#include "divepixmapitem.h"
#include "animationfunctions.h"
#include <divepicturewidget.h>
+#include <preferences.h>
#include <QPen>
#include <QBrush>
@@ -22,6 +23,13 @@ DivePictureItem::DivePictureItem(int row, QObject *parent): DivePixmapItem(paren
#endif
rowOnModel = row;
setScale(0.2);
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
+ setVisible(prefs.show_pictures_in_profile);
+}
+
+void DivePictureItem::settingsChanged()
+{
+ setVisible(prefs.show_pictures_in_profile);
}
void DivePictureItem::setPixmap(const QPixmap &pix)
diff --git a/qt-ui/profile/divepixmapitem.h b/qt-ui/profile/divepixmapitem.h
index 26aeeaf65..950b211d2 100644
--- a/qt-ui/profile/divepixmapitem.h
+++ b/qt-ui/profile/divepixmapitem.h
@@ -20,6 +20,8 @@ class DivePictureItem : public DivePixmapItem {
public:
DivePictureItem(int row, QObject *parent = 0);
void setPixmap(const QPixmap& pix);
+public slots:
+ void settingsChanged();
protected:
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index fe19c7b21..298fcd048 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -555,7 +555,6 @@ void ProfileWidget2::settingsChanged()
isPlotZoomed = prefs.zoomed_plot;
needReplot = true;
}
-
if (needReplot)
replot();
}