Found a bug in the PartRange class under the method of IsHole.
This:
if (i < EndIndex)
{
x2 = Vertices[(i + 1) * 2];
y2 = Vertices[(i + 1) * 2 + 1];
}
else
{
x2 = Vertices[StartIndex];
y2 = Vertices[StartIndex + 1];
}
should be changed to:
if (i < EndIndex) {
x2 = Vertices((i + 1) * 2);
y2 = Vertices((i + 1) * 2 + 1);
} else {
x2 = Vertices(StartIndex * 2);
y2 = Vertices(StartIndex * 2 + 1);
}
I have attached a shapefile ("ModArea", not the Union) to show you the problem. Try clicking on the bottom left shape and you will notice that both shapes get selected even though the outside shape is a donut.
Comments: Please use [github](https://github.com/DotSpatial/DotSpatial) for posting issues.
This:
if (i < EndIndex)
{
x2 = Vertices[(i + 1) * 2];
y2 = Vertices[(i + 1) * 2 + 1];
}
else
{
x2 = Vertices[StartIndex];
y2 = Vertices[StartIndex + 1];
}
should be changed to:
if (i < EndIndex) {
x2 = Vertices((i + 1) * 2);
y2 = Vertices((i + 1) * 2 + 1);
} else {
x2 = Vertices(StartIndex * 2);
y2 = Vertices(StartIndex * 2 + 1);
}
I have attached a shapefile ("ModArea", not the Union) to show you the problem. Try clicking on the bottom left shape and you will notice that both shapes get selected even though the outside shape is a donut.
Comments: Please use [github](https://github.com/DotSpatial/DotSpatial) for posting issues.