1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Be more tolerant to broken TYP files

Where possible, only skip the point/line/polygon entry, not the whole TYP file.
This commit is contained in:
Martin Tůma 2022-04-24 17:19:26 +02:00
parent 208e31c6de
commit 8f9af0d973
2 changed files with 526 additions and 484 deletions

File diff suppressed because it is too large Load Diff

View File

@ -147,18 +147,25 @@ private:
bool parseTYPFile(SubFile *file); bool parseTYPFile(SubFile *file);
bool parsePoints(SubFile *file, SubFile::Handle &hdl, bool parsePoints(SubFile *file, SubFile::Handle &hdl,
const Section &section); const Section &section);
bool parsePoint(SubFile *file, SubFile::Handle &hdl,
const Section &section, const ItemInfo &info, quint32 type);
bool parseLines(SubFile *file, SubFile::Handle &hdl, bool parseLines(SubFile *file, SubFile::Handle &hdl,
const Section &section); const Section &section);
bool parseLine(SubFile *file, SubFile::Handle &hdl,
const Section &section, const ItemInfo &info, quint32 type);
bool parsePolygons(SubFile *file, SubFile::Handle &hdl, bool parsePolygons(SubFile *file, SubFile::Handle &hdl,
const Section &section); const Section &section);
bool parsePolygon(SubFile *file, SubFile::Handle &hdl,
const Section &section, const ItemInfo &info, quint32 type);
bool parseDrawOrder(SubFile *file, SubFile::Handle &hdl, bool parseDrawOrder(SubFile *file, SubFile::Handle &hdl,
const Section &section); const Section &section);
bool itemInfo(SubFile *file, SubFile::Handle &hdl,
const Section &section, ItemInfo &info);
void defaultPolygonStyle(); void defaultPolygonStyle();
void defaultLineStyle(); void defaultLineStyle();
void defaultPointStyle(); void defaultPointStyle();
static bool itemInfo(SubFile *file, SubFile::Handle &hdl,
const Section &section, ItemInfo &info);
QMap<quint32, Line> _lines; QMap<quint32, Line> _lines;
QMap<quint32, Polygon> _polygons; QMap<quint32, Polygon> _polygons;
QMap<quint32, Point> _points; QMap<quint32, Point> _points;