Skip to content

Commit 542fb83

Browse files
committed
Revert "OcdFileImport: Handle emtpy area holes"
This reverts commit a80daf2. "PathCoordVector: Align update with recalculateParts" is the alternate fix to the empty area holes issue.
1 parent 895134b commit 542fb83

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/fileformats/ocd_file_import.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-3.0-or-later
22
*
3-
* Copyright 2013-2024 Kai Pastor (OpenOrienteering)
3+
* Copyright 2013-2022 Kai Pastor (OpenOrienteering)
44
* Some parts taken from file_format_oc*d8{.h,_p.h,cpp} which are
55
* Copyright 2012 Pete Curtis (OpenOrienteering)
66
*
@@ -2246,17 +2246,6 @@ void OcdFileImport::fillPathCoords(OcdImportedPathObject *object, bool is_area,
22462246
size_t start = 0;
22472247
for (size_t i = 0; i < object->coords.size(); ++i)
22482248
{
2249-
// There are .ocd files that erroneously contain an empty area hole, i.e., there are two subsequent points
2250-
// with the Ocd::OcdPoint32::FlagHole property. To fix this, the first of these points needs to be ignored.
2251-
// Since setPointFlags() applies the HolePoint property to the last point instead of the first point of the next part,
2252-
// the consequence is that instead of removing the first point of these two .ocd points,
2253-
// the second point of the two Mapper points with the HolePoint property needs to be removed.
2254-
// Using a loop ensures that multiple subsequent empty area holes are removed.
2255-
while (is_area && i < object->coords.size() - 1 && object->coords[i].isHolePoint() && object->coords[i+1].isHolePoint())
2256-
{
2257-
object->coords.erase(begin(object->coords) + i + 1);
2258-
}
2259-
22602249
if (leave_paths_open || (!object->coords[i].isHolePoint() && i < object->coords.size() - 1))
22612250
continue;
22622251

0 commit comments

Comments
 (0)