mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-13 18:35:11 +02:00
Added support for polygon objects
This commit is contained in:
@ -69,7 +69,7 @@ void ElevationGraph::setInfo()
|
||||
|
||||
GraphItem *ElevationGraph::loadGraph(const Graph &graph, Type type)
|
||||
{
|
||||
if (graph.size() < 2) {
|
||||
if (!graph.isValid()) {
|
||||
skipColor();
|
||||
return 0;
|
||||
}
|
||||
@ -97,9 +97,11 @@ QList<GraphItem*> ElevationGraph::loadData(const Data &data)
|
||||
QList<GraphItem*> graphs;
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++)
|
||||
graphs.append(loadGraph(data.tracks().at(i)->elevation(), Track));
|
||||
graphs.append(loadGraph(data.tracks().at(i).elevation(), Track));
|
||||
for (int i = 0; i < data.routes().count(); i++)
|
||||
graphs.append(loadGraph(data.routes().at(i)->elevation(), Route));
|
||||
graphs.append(loadGraph(data.routes().at(i).elevation(), Route));
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
skipColor();
|
||||
|
||||
setInfo();
|
||||
redraw();
|
||||
|
Reference in New Issue
Block a user