mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Do not fetch polygon labels as they are unused anyway
This commit is contained in:
parent
5b6cd24839
commit
ae2ff99be8
@ -118,7 +118,7 @@ bool RGNFile::init(Handle &hdl)
|
|||||||
|
|
||||||
bool RGNFile::polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
bool RGNFile::polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl, NETFile *net,
|
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()))
|
if (!seek(hdl, segment.start()))
|
||||||
return false;
|
return false;
|
||||||
@ -172,7 +172,7 @@ bool RGNFile::polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
|||||||
if (!rect.intersects(br))
|
if (!rect.intersects(br))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lbl && (labelPtr & 0x3FFFFF)) {
|
if (line && lbl && (labelPtr & 0x3FFFFF)) {
|
||||||
if (labelPtr & 0x800000) {
|
if (labelPtr & 0x800000) {
|
||||||
quint32 lblOff;
|
quint32 lblOff;
|
||||||
if (net && net->lblOffset(netHdl, labelPtr & 0x3FFFFF, 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))
|
if (!rect.intersects(br))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (lbl && (labelPtr & 0x3FFFFF))
|
if (line && lbl && (labelPtr & 0x3FFFFF))
|
||||||
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
||||||
|
|
||||||
polys->append(poly);
|
polys->append(poly);
|
||||||
@ -409,12 +409,12 @@ void RGNFile::objects(const RectC &rect, const SubDiv *subdiv,
|
|||||||
case Segment::Line:
|
case Segment::Line:
|
||||||
if (lines)
|
if (lines)
|
||||||
polyObjects(rect, rgnHdl, subdiv, segment, lbl, lblHdl, net,
|
polyObjects(rect, rgnHdl, subdiv, segment, lbl, lblHdl, net,
|
||||||
netHdl, lines);
|
netHdl, lines, true);
|
||||||
break;
|
break;
|
||||||
case Segment::Polygon:
|
case Segment::Polygon:
|
||||||
if (polygons)
|
if (polygons)
|
||||||
polyObjects(rect, rgnHdl, subdiv, segment, lbl, lblHdl, net,
|
polyObjects(rect, rgnHdl, subdiv, segment, lbl, lblHdl, net,
|
||||||
netHdl, polygons);
|
netHdl, polygons, false);
|
||||||
break;
|
break;
|
||||||
case Segment::RoadReference:
|
case Segment::RoadReference:
|
||||||
break;
|
break;
|
||||||
|
@ -62,7 +62,7 @@ private:
|
|||||||
QVector<Segment> segments(Handle &hdl, const SubDiv *subdiv) const;
|
QVector<Segment> segments(Handle &hdl, const SubDiv *subdiv) const;
|
||||||
bool polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
bool polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl, NETFile *net,
|
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,
|
bool pointObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
||||||
QList<IMG::Point> *points) const;
|
QList<IMG::Point> *points) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user