OnMouseDown event causes a NullReferenceException


The OnMouseDown event in Diagram.cs causes a NullReferenceException in the following lines. The CurrentMouseElements.MouseStartElement.Container is null.
Setting the container when the shape is created does not have any effect.
This error is only available once the changes to the GetSelectedShapes procedure have been applied in my previous bug report.
Sorry if this is all getting confusing.
if (IsOrderable(CurrentMouseElements.MouseStartElement))
                            if (CurrentMouseElements.MouseStartElement is Shape) CurrentMouseElements.MouseStartElement.Container.Elements.BringToFront(CurrentMouseElements.MouseStartElement);
                            if (CurrentMouseElements.MouseStartElement is Line) CurrentMouseElements.MouseStartElement.Container.Elements.BringToFront(CurrentMouseElements.MouseStartElement);
                            //Redraw all connectors with jumps
                            if (CurrentMouseElements.MouseStartElement is Connector) RedrawConnectors();


JamesWestgate wrote Jan 27, 2009 at 3:11 PM

Previous issue addressed. Container code refactored for this release. Please retest.

wrote Jan 27, 2009 at 3:11 PM

JamesWestgate wrote Apr 3, 2009 at 9:25 PM

Closing this off assuming nolonger an issue.

wrote Apr 3, 2009 at 9:25 PM

wrote Feb 14, 2013 at 7:33 PM

wrote May 16, 2013 at 9:39 AM

wrote May 16, 2013 at 9:39 AM

wrote Jun 14, 2013 at 7:13 AM