mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
d6fddcaadc
commit
b3e3947b79
3 changed files with 18 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue