Crash while editing a line (#406)
I added a line element to a deployment diagram. Then I tried to edit the line (I wanted to move one of the line ends). This caused the following exception:
System.OverflowException: Overflow error.
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2)
at System.Drawing.Graphics.DrawLine(Pen pen, Point pt1, Point pt2)
at SoftwareIdeasModeler.Visualisation.DiagramDrawer.DrawLine(Pen pen, Single x1, Single y1, Single x2, Single y2)
at SoftwareIdeasModeler.Visualisation.DiagramDrawer.DrawLine(Pen pen, Line line)
at SoftwareIdeasModeler.SimDiagramControl.DrawDistanceSnap(DiagramDrawer drawer)
at SoftwareIdeasModeler.SimDiagramControl.canvas_Paint(Object sender, PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
After the exception, I closed and reopened the diagram and I was able to edit the line without any errors.