MapWindow / MapWindow5

MW5 is a desktop GIS which is extendable using the plug-in architecture. It is using the MapWinGIS mapping control and is created from scratch in 2015 using new technologies like MEF and Dependency Injection making it small in size, robust and fast.
290 stars 100 forks source link

Group index is out of bounds #13

Closed marblemm closed 6 years ago

marblemm commented 7 years ago

Each time the group is added, and then remove the group, a bug occurs, which should be caused by the index of the group when the LegendGroups is added to the group,because LegendGroups must manage _positions and _allGroups, if remove group ,_positions and _allGroup index is different;

Stack trace: at MW5.Api.Legend.LegendGroups.get_Item(Int32 position) at MW5.Api.Legend.LegendGroups.ItemByHandle(Int32 handle) at MW5.Controls.LegendPresenter.RunCommand(LegendCommand command) at MW5.Plugins.Mvp.CommandDispatcher1.RunCommandCore(String key) at MW5.Plugins.Mvp.CommandDispatcher1.ItemClick(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) 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.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea) at Syncfusion.Windows.Forms.Tools.ContextMenuStripEx.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.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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)

pmeems commented 6 years ago

You closed this. Does it mean the problem was not in MW5?