From 9a459dc3658097d5e42d0e25050ed40443ee3d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 18 Jan 2021 00:18:52 +0100 Subject: [PATCH] Properly handle the marker when there are multiple tracks --- src/GUI/gui.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp index 79a73b89..841e679d 100644 --- a/src/GUI/gui.cpp +++ b/src/GUI/gui.cpp @@ -859,10 +859,17 @@ void GUI::loadData(const Data &data) _splitter->refresh(); paths = _mapView->loadData(data); + GraphTab *gt = static_cast(_graphTabWidget->currentWidget()); + int index = _graphTabWidget->currentIndex(); + for (int i = 0; i < paths.count(); i++) { + PathItem *pi = paths.at(i); + for (int j = 0; j < graphs.count(); j++) - paths.at(i)->addGraph(graphs.at(j).at(i)); - paths.at(i)->setGraph(_graphTabWidget->currentIndex()); + pi->addGraph(graphs.at(j).at(i)); + + pi->setGraph(index); + pi->setMarkerPosition(gt->sliderPosition()); } }