mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Parse waypoint symbols
+ fixed error handling
This commit is contained in:
parent
93377964d8
commit
a42280dec3
@ -203,10 +203,17 @@ bool TwoNavParser::parse(QFile *file, QList<TrackData> &tracks,
|
|||||||
waypoint = true;
|
waypoint = true;
|
||||||
}}
|
}}
|
||||||
break;
|
break;
|
||||||
|
case 'w':
|
||||||
|
{line.remove(0, 1);
|
||||||
|
QStringList list(codec.toString(line).split(','));
|
||||||
|
if (list.size() && waypoints.size())
|
||||||
|
waypoints.last().setSymbol(list.at(0).trimmed());}
|
||||||
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
{QStringList list(codec.toString(line).split(',', SKIP_EMPTY));
|
{QStringList list(codec.toString(line).split(','));
|
||||||
routes.append(RouteData());
|
routes.append(RouteData());
|
||||||
routes.last().setName(list.at(1));
|
if (list.size() > 1)
|
||||||
|
routes.last().setName(list.at(1));
|
||||||
route = true;}
|
route = true;}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user