mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 11:39:16 +02:00
@ -47,7 +47,7 @@ QList<GraphItem*> CadenceGraph::loadData(const Data &data)
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.cadence();
|
||||
|
||||
if (!graph.isValid()) {
|
||||
if (graph.isEmpty()) {
|
||||
_palette.nextColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
|
@ -85,7 +85,7 @@ void ElevationGraph::setInfo()
|
||||
GraphItem *ElevationGraph::loadGraph(const Graph &graph, PathType type,
|
||||
const QColor &color, bool primary)
|
||||
{
|
||||
if (!graph.isValid())
|
||||
if (graph.isEmpty())
|
||||
return 0;
|
||||
|
||||
ElevationGraphItem *gi = new ElevationGraphItem(graph, _graphType, _width,
|
||||
|
@ -50,7 +50,7 @@ QList<GraphItem*> GearRatioGraph::loadData(const Data &data)
|
||||
for (int i = 0; i < data.tracks().count(); i++) {
|
||||
const Graph &graph = data.tracks().at(i).ratio();
|
||||
|
||||
if (!graph.isValid()) {
|
||||
if (graph.isEmpty()) {
|
||||
_palette.nextColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
|
@ -8,8 +8,6 @@ GraphItem::GraphItem(const Graph &graph, GraphType type, int width,
|
||||
const QColor &color, Qt::PenStyle style, QGraphicsItem *parent)
|
||||
: GraphicsItem(parent), _graph(graph), _type(type), _secondaryGraph(0)
|
||||
{
|
||||
Q_ASSERT(_graph.isValid());
|
||||
|
||||
_units = Metric;
|
||||
_sx = 0; _sy = 0;
|
||||
_color = color;
|
||||
|
@ -47,7 +47,7 @@ QList<GraphItem*> HeartRateGraph::loadData(const Data &data)
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.heartRate();
|
||||
|
||||
if (!graph.isValid()) {
|
||||
if (graph.isEmpty()) {
|
||||
_palette.nextColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
|
@ -47,7 +47,7 @@ QList<GraphItem*> PowerGraph::loadData(const Data &data)
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.power();
|
||||
|
||||
if (!graph.isValid()) {
|
||||
if (graph.isEmpty()) {
|
||||
_palette.nextColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
|
@ -50,7 +50,7 @@ void SpeedGraph::setInfo()
|
||||
GraphItem *SpeedGraph::loadGraph(const Graph &graph, const Track &track,
|
||||
const QColor &color, bool primary)
|
||||
{
|
||||
if (!graph.isValid())
|
||||
if (graph.isEmpty())
|
||||
return 0;
|
||||
|
||||
SpeedGraphItem *gi = new SpeedGraphItem(graph, _graphType, _width,
|
||||
|
@ -51,7 +51,7 @@ QList<GraphItem*> TemperatureGraph::loadData(const Data &data)
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.temperature();
|
||||
|
||||
if (!graph.isValid()) {
|
||||
if (graph.isEmpty()) {
|
||||
_palette.nextColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user