mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Parse waypoint symbols
+ fixed error handling
This commit is contained in:
parent
93377964d8
commit
a42280dec3
@ -203,9 +203,16 @@ 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());
|
||||||
|
if (list.size() > 1)
|
||||||
routes.last().setName(list.at(1));
|
routes.last().setName(list.at(1));
|
||||||
route = true;}
|
route = true;}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user