diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-12-30 21:57:12 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-30 16:14:53 -0800 |
commit | b3e3947b79e91d76db1d9d14f6c3701dad53a224 (patch) | |
tree | 6c36d983b784dea15b2d1d27844911d92c101fec /qt-ui/profile/profilewidget2.cpp | |
parent | d6fddcaadc6e912a94561483ae8a1297e12a5c3e (diff) | |
download | subsurface-b3e3947b79e91d76db1d9d14f6c3701dad53a224.tar.gz |
Make the moving mean depth line work
It's a bit jumpy, but works.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 979e9c21b..b24132555 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -117,7 +117,7 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), addItemsToScene(); scene()->installEventFilter(this); connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged())); - + connect(this, SIGNAL(mouseMoved(int,int)), instantMeanDepth, SLOT(mouseMoved(int,int))); QAction *action = NULL; #define ADD_ACTION(SHORTCUT, Slot) \ action = new QAction(this); \ @@ -606,6 +606,8 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) meanDepth->setLine(0, 0, timeAxis->posAtValue(currentdc->duration.seconds), 0); Animations::moveTo(meanDepth,3, profileYAxis->posAtValue(plotInfo.meandepth)); + instantMeanDepth->vAxis = profileYAxis; + instantMeanDepth->hAxis = timeAxis; instantMeanDepth->setVisible(prefs.show_average_depth); instantMeanDepth->setModel(dataModel); |