It has a function that handles mouse button events. ChartControl.MouseLeftButtonDown += MouseClicked;
The function loops over rectangles an does some actions with the one that user selects.
foreach (Zone D in DemandZones)
{
if (D.Z.IsSelected)
{
Log("clicked on " + D.Z.Tag , LogLevel.Information);
}
}
It works fine. However, if user selects a rectangle and UNLOCKS it, the rectangle remains Selected. Now this functions find two selected rectangles: the one that has been unlocked and a new one the user clicks after. Locking that first one back does not change anything, it remains Selected.
Comment