1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Parse waypoint symbols

+ fixed error handling
This commit is contained in:
Martin Tůma 2021-12-24 15:09:19 +01:00
parent 93377964d8
commit a42280dec3

View File

@ -203,10 +203,17 @@ bool TwoNavParser::parse(QFile *file, QList<TrackData> &tracks,
waypoint = true;
}}
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':
{QStringList list(codec.toString(line).split(',', SKIP_EMPTY));
{QStringList list(codec.toString(line).split(','));
routes.append(RouteData());
routes.last().setName(list.at(1));
if (list.size() > 1)
routes.last().setName(list.at(1));
route = true;}
break;
}