Application crash when pasting (#261)
I get the following error when I try to paste as a new instance a block declared in another block diagram:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at SoftwareIdeasModeler.Core.DiagramItems.MultiPartElements.ConcreteMultiPartElement.DrawElement(DiagramDrawer drawer, DrawingParameters param)
at SoftwareIdeasModeler.Core.Projecting.ConcreteDiagramItem.Draw(DiagramDrawer drawer, DrawingParameters param)
at SoftwareIdeasModeler.Visualisation.DiagramDrawer.Draw(DiagramLayer layer, ConcreteDiagramItem item)
at SoftwareIdeasModeler.Visualisation.DiagramDrawer.Draw(DiagramLayer layer, Rectangle clipArea)
at SoftwareIdeasModeler.Visualisation.DiagramDrawer.Draw(Diagram diagram, Rectangle drawBounds)
at SoftwareIdeasModeler.SimDiagramControl.canvas_Paint(Object sender, PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)