@@ -2127,20 +2127,6 @@ Object* OcdFileImport::importRectangleObject(const Ocd::OcdPoint32* ocd_points,
21272127 return border_path;
21282128}
21292129
2130- void OcdFileImport::setPathHolePoint (OcdImportedPathObject *object, quint32 pos)
2131- {
2132- // Look for curve start points before the current point and apply hole point only if no such point is there.
2133- // This prevents hole points in the middle of a curve caused by incorrect map objects.
2134- if (pos >= 1 && object->coords [pos].isCurveStart ())
2135- ; // object->coords[i-1].setHolePoint(true);
2136- else if (pos >= 2 && object->coords [pos-1 ].isCurveStart ())
2137- ; // object->coords[i-2].setHolePoint(true);
2138- else if (pos >= 3 && object->coords [pos-2 ].isCurveStart ())
2139- ; // object->coords[i-3].setHolePoint(true);
2140- else if (pos > 0 ) // Don't start with hole point.
2141- object->coords [pos].setHolePoint (true );
2142- }
2143-
21442130/* * Translates the OC*D path given in the last two arguments into an Object.
21452131 */
21462132void OcdFileImport::fillPathCoords (OcdImportedPathObject *object, bool is_area, quint32 num_points, const Ocd::OcdPoint32* ocd_points)
@@ -2163,7 +2149,16 @@ void OcdFileImport::fillPathCoords(OcdImportedPathObject *object, bool is_area,
21632149
21642150 if (ocd_point.y & Ocd::OcdPoint32::FlagHole && is_area && i > 1 )
21652151 {
2166- setPathHolePoint (object, i - 1 );
2152+ // Look for curve start points before the current point and apply hole point only if no such point is there.
2153+ // 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 ())
2157+ ; // object->coords[i-2].setHolePoint(true);
2158+ else if (i >= 4 && object->coords [i-3 ].isCurveStart ())
2159+ ; // object->coords[i-3].setHolePoint(true);
2160+ else if (i > 1 ) // Don't start with hole point.
2161+ object->coords [i-1 ].setHolePoint (true );
21672162 }
21682163 };
21692164
0 commit comments