diff --git a/src/lib_gui/qt/view/QtGraphView.cpp b/src/lib_gui/qt/view/QtGraphView.cpp index ebc302c6..ed4db57b 100644 --- a/src/lib_gui/qt/view/QtGraphView.cpp +++ b/src/lib_gui/qt/view/QtGraphView.cpp @@ -125,6 +125,7 @@ void QtGraphView::initView() m_trailDepthSlider->setMaximum(26); m_trailDepthSlider->setValue(5); connect(m_trailDepthSlider, &QSlider::valueChanged, this, &QtGraphView::trailDepthChanged); + connect(m_trailDepthSlider, &QSlider::sliderReleased, this, &QtGraphView::trailDepthUpdated); m_collapseButton->setGeometry(0, 0, 26, 20); m_backwardTrailButton->setGeometry(0, 22, 26, 26); @@ -631,6 +632,14 @@ void QtGraphView::trailDepthChanged(int) } } +void QtGraphView::trailDepthUpdated() +{ + if (m_oldGraph->getTrailMode() != Graph::TRAIL_NONE) + { + activateTrail(m_oldGraph->hasTrailOrigin()); + } +} + void QtGraphView::clickedCollapse() { dynamic_cast(m_trailWidget->layout())->setCurrentIndex(0); diff --git a/src/lib_gui/qt/view/QtGraphView.h b/src/lib_gui/qt/view/QtGraphView.h index b53c9bfb..fd659c50 100644 --- a/src/lib_gui/qt/view/QtGraphView.h +++ b/src/lib_gui/qt/view/QtGraphView.h @@ -75,6 +75,7 @@ private slots: void resized(); void trailDepthChanged(int); + void trailDepthUpdated(); void clickedCollapse(); void clickedExpand();