@@ -2129,7 +2129,7 @@ Object* OcdFileImport::importRectangleObject(const Ocd::OcdPoint32* ocd_points,
21292129
21302130/* * Translates the OC*D path given in the last two arguments into an Object.
21312131 */
2132- void OcdFileImport::fillPathCoords (OcdImportedPathObject *object, bool is_area, quint32 num_points, const Ocd::OcdPoint32* ocd_points)
2132+ void OcdFileImport::fillPathCoords (OcdImportedPathObject *object, bool is_area, quint32 num_points, const Ocd::OcdPoint32* ocd_points) const
21332133{
21342134 object->coords .resize (num_points);
21352135 for (auto i = 0u ; i < num_points; i++)
@@ -2146,18 +2146,15 @@ void OcdFileImport::fillPathCoords(OcdImportedPathObject *object, bool is_area,
21462146 // CurveStart needs to be applied to the start point
21472147 object->coords [i-1 ].setCurveStart (true );
21482148 }
2149-
2150- if (ocd_point.y & Ocd::OcdPoint32::FlagHole && is_area && i > 1 )
2149+ else if (ocd_point.y & Ocd::OcdPoint32::FlagHole && is_area && i > 1 )
21512150 {
21522151 // Look for curve start points before the current point and apply hole point only if no such point is there.
21532152 // This prevents hole points in the middle of a curve caused by incorrect map objects.
2154- if (i >= 2 && object->coords [i-1 ].isCurveStart ())
2155- ; // object->coords[i-1].setHolePoint(true);
2156- else if (i >= 3 && object->coords [i-2 ].isCurveStart ())
2153+ if (i >= 3 && object->coords [i-2 ].isCurveStart ())
21572154 ; // object->coords[i-2].setHolePoint(true);
21582155 else if (i >= 4 && object->coords [i-3 ].isCurveStart ())
21592156 ; // object->coords[i-3].setHolePoint(true);
2160- else if (i > 1 ) // Don't start with hole point.
2157+ else
21612158 object->coords [i-1 ].setHolePoint (true );
21622159 }
21632160 };
0 commit comments