1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Properly handle the marker when there are multiple tracks

This commit is contained in:
Martin Tůma 2021-01-18 00:18:52 +01:00
parent 2bbf75cb0b
commit 9a459dc365

View File

@ -859,10 +859,17 @@ void GUI::loadData(const Data &data)
_splitter->refresh();
paths = _mapView->loadData(data);
GraphTab *gt = static_cast<GraphTab*>(_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());
}
}