Deleting elements which are not used on a diagram results in error (#423)

Steps to repeat:

  • Open model with at least one element that is unused
  • Open Element Browser
  • Identify an element which is unused (light red background)
  • Right-click, Delete the element

This results in the following error:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

at SoftwareIdeasModeler.Controls.FastGrid.GridData.UpdateIndexes(Int32 fromIndex)

at SoftwareIdeasModeler.Controls.FastGrid.GridData.RemoveRow(GridRow row)

at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)

at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ToolStrip.WndProc(Message& m)

at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

OF=SoftwareIdeasModeler.MainForm

LastCmd=SoftwareIdeasModeler.Core.Commands.DeleteFromProjectCommand

OF=DockablePanel.Controls.DockablePanel.FloatingForm

OF=DockablePanel.Controls.DockablePanel.FloatingForm

OF=SoftwareIdeasModeler.Forms.ModelOverviewForm

OF=SoftwareIdeasModeler.Forms.ElementBrowserForm

OF=SoftwareIdeasModeler.Forms.EditorForm

Created
24 March 2015 18:35:18
Closed
30 March 2015 22:16:42
Requested by
Chris Simmons
State
Solved
Version
8.30.5553.39285 64-bit
OperatingSystem
Win7 64-bit
Solved in
8.31
TrackedRequestComment
Your Name:
You can use these formatting tags: [b]bold[/b] [i]italic[/i] [u]underline[/u] [url]www.example.com[/url] [code]some code[/code] [quote]quoted text[/quote] [list]one list item per line[/list]