Hi,
I’ve written a RealTimeDragSelectingTool like in the Possible bug in dragselectiontool thread.
Now I realized that the part which unselect previously selected Parts is working, but doesn’t reflect in the diagram. The Parts are still drawing with the resize-adorner. I’m sure this was working in 2.1.
Is it possible there is a bug?
// select parts, and unselect all other previously selected parts
// this tries to avoid deselecting and then reselecting any Part
List<Part> tounselect = new List<Part>();
foreach (Part p in diagram.SelectedParts)
{
if (!parts.Contains(p)) tounselect.Add(p);
}
foreach (Part p in tounselect)
{
p.IsSelected = false; // <--- is modifing SelectedParts, but not the Adorner
}
foreach (Part p in parts)
{
if (!p.IsSelected) p.IsSelected = true;
}