Commit a80daf2
OcdFileImport: Handle emtpy area holes
There are .ocd files that erroneously contain an empty area hole, i.e.,
there are two subsequent points with the Ocd::OcdPoint32::FlagHole
property.
If such a malformed .ocd file is imported Mapper will crash if the
area object containing the empty hole is selected.
To fix this, the first of these .ocd points needs to be ignored.
Since setPointFlags() applies the HolePoint property to the last point
instead of the first point of the next part, the consequence is that
instead of removing the first point of these two .ocd points, the
second point of the two Mapper points with the HolePoint property needs
to be removed.
Using a loop ensures that multiple subsequent empty area holes are
removed.
Co-authored-by: lpechacek <[email protected]>1 parent 954954e commit a80daf2
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
2153 | 2153 | | |
2154 | 2154 | | |
2155 | 2155 | | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
2156 | 2167 | | |
2157 | 2168 | | |
2158 | 2169 | | |
| |||
0 commit comments