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

Do not fetch polygon labels as they are unused anyway

This commit is contained in:
Martin Tůma 2020-01-22 07:46:58 +01:00
parent 5b6cd24839
commit ae2ff99be8
2 changed files with 6 additions and 6 deletions

View File

@ -118,7 +118,7 @@ bool RGNFile::init(Handle &hdl)
bool RGNFile::polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
const Segment &segment, LBLFile *lbl, Handle &lblHdl, NETFile *net,
Handle &netHdl, QList<IMG::Poly> *polys) const
Handle &netHdl, QList<IMG::Poly> *polys, bool line) const
{
if (!seek(hdl, segment.start()))
return false;
@ -172,7 +172,7 @@ bool RGNFile::polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
if (!rect.intersects(br))
continue;
if (lbl && (labelPtr & 0x3FFFFF)) {
if (line && lbl && (labelPtr & 0x3FFFFF)) {
if (labelPtr & 0x800000) {
quint32 lblOff;
if (net && net->lblOffset(netHdl, labelPtr & 0x3FFFFF, lblOff)
@ -278,7 +278,7 @@ bool RGNFile::extPolyObjects(const RectC &rect, Handle &hdl,
if (!rect.intersects(br))
continue;
if (lbl && (labelPtr & 0x3FFFFF))
if (line && lbl && (labelPtr & 0x3FFFFF))
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
polys->append(poly);
@ -409,12 +409,12 @@ void RGNFile::objects(const RectC &rect, const SubDiv *subdiv,
case Segment::Line:
if (lines)
polyObjects(rect, rgnHdl, subdiv, segment, lbl, lblHdl, net,
netHdl, lines);
netHdl, lines, true);
break;
case Segment::Polygon:
if (polygons)
polyObjects(rect, rgnHdl, subdiv, segment, lbl, lblHdl, net,
netHdl, polygons);
netHdl, polygons, false);
break;
case Segment::RoadReference:
break;

View File

@ -62,7 +62,7 @@ private:
QVector<Segment> segments(Handle &hdl, const SubDiv *subdiv) const;
bool polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
const Segment &segment, LBLFile *lbl, Handle &lblHdl, NETFile *net,
Handle &netHdl, QList<IMG::Poly> *polys) const;
Handle &netHdl, QList<IMG::Poly> *polys, bool line) const;
bool pointObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
const Segment &segment, LBLFile *lbl, Handle &lblHdl,
QList<IMG::Point> *points) const;