aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/mainwindow.cpp1
-rw-r--r--qt-ui/profile/divepixmapitem.cpp8
-rw-r--r--qt-ui/profile/divepixmapitem.h2
-rw-r--r--qt-ui/profile/profilewidget2.cpp1
4 files changed, 11 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 4173c5f07..2b762d9bf 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1279,6 +1279,7 @@ TOOLBOX_PREF_PROFILE(profRuler, rulergraph, rulergraph);
TOOLBOX_PREF_PROFILE(profSAC, show_sac, show_sac);
TOOLBOX_PREF_PROFILE(profScaled, zoomed_plot, zoomed_plot);
TOOLBOX_PREF_PROFILE(profTogglePicture, show_pictures_in_profile, show_pictures_in_profile);
+
void MainWindow::turnOffNdlTts()
{
const bool triggered = false;
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();
}