ui: Update visible depth graph when changing depth level (issue #484)

This commit is contained in:
Eberhard Graether
2017-11-26 14:59:51 +01:00
parent 0d5c19db00
commit 7903ef9c1e
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -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<QStackedLayout*>(m_trailWidget->layout())->setCurrentIndex(0);