This project is read-only.

Legend Problems

Nov 18, 2011 at 9:36 PM
Edited Nov 18, 2011 at 9:37 PM

This was posted before. It was verified as an issue but the problem still exists with the latest build.

Selecting a layer in the Legend and choosing Properties, View Attribute Table, etc. opens up multiple instances of the same form. The application then dies when trying to close any of the forms.

Here is the error dump for the Table Editor:

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=DotSpatial.Symbology.Forms
  StackTrace:
       at DotSpatial.Symbology.Forms.TableEditorControl.SetSelectionFromLayer() in g:\TeamCity\buildAgent\work\221f7dbb88f341a4\DotSpatial.Symbology.Forms\TableEditorControl.cs:line 619
       at DotSpatial.Symbology.Forms.TableEditorControl.SelectedFeaturesChanged(Object sender, EventArgs e) in g:\TeamCity\buildAgent\work\221f7dbb88f341a4\DotSpatial.Symbology.Forms\TableEditorControl.cs:line 593
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at DotSpatial.Symbology.Layer.OnSelectionChanged() in g:\TeamCity\buildAgent\work\221f7dbb88f341a4\DotSpatial.Symbology\Layer.cs:line 735
       at DotSpatial.Symbology.FeatureLayer.SelectedFeaturesChanged(Object sender, EventArgs e) in g:\TeamCity\buildAgent\work\221f7dbb88f341a4\DotSpatial.Symbology\FeatureLayer.cs:line 344
       at DotSpatial.Symbology.Changeable.OnChanged() in g:\TeamCity\buildAgent\work\221f7dbb88f341a4\DotSpatial.Symbology\Changeable.cs:line 127
       at DotSpatial.Symbology.IndexSelection.Add(Int32 index) in g:\TeamCity\buildAgent\work\221f7dbb88f341a4\DotSpatial.Symbology\IndexSelection.cs:line 697
       at DotSpatial.Symbology.Forms.TableEditorControl.DataGridView1SelectionChanged(Object sender, EventArgs e) in g:\TeamCity\buildAgent\work\221f7dbb88f341a4\DotSpatial.Symbology.Forms\TableEditorControl.cs:line 900
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.DataGridView.OnSelectionChanged(EventArgs e)
       at System.Windows.Forms.DataGridView.FlushSelectionChanged()
       at System.Windows.Forms.DataGridView.ClearSelection(Int32 columnIndexException, Int32 rowIndexException, Boolean selectExceptionElement)
       at System.Windows.Forms.DataGridView.SetAndSelectCurrentCellAddress(Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick, Boolean clearSelection, Boolean forceCurrentCellSelection)
       at System.Windows.Forms.DataGridView.MakeFirstDisplayedCellCurrentCell(Boolean includeNewRow)
       at System.Windows.Forms.DataGridView.OnRowCollectionChanged_PostNotification(Boolean recreateNewRow, Boolean allowSettingCurrentCell, CollectionChangeAction cca, DataGridViewRow dataGridViewRow, Int32 rowIndex)
       at System.Windows.Forms.DataGridViewRowCollection.OnCollectionChanged_PostNotification(CollectionChangeAction cca, Int32 rowIndex, Int32 rowCount, DataGridViewRow dataGridViewRow, Boolean changeIsDeletion, Boolean changeIsInsertion, Boolean recreateNewRow, Point newCurrentCell)
       at System.Windows.Forms.DataGridViewRowCollection.OnCollectionChanged(CollectionChangeEventArgs e, Int32 rowIndex, Int32 rowCount)
       at System.Windows.Forms.DataGridViewRowCollection.AddInternal(DataGridViewRow dataGridViewRow)
       at System.Windows.Forms.DataGridView.RefreshRows(Boolean scrollIntoView)
       at System.Windows.Forms.DataGridView.RefreshColumnsAndRows()
       at System.Windows.Forms.DataGridView.DataGridViewDataConnection.ProcessListChanged(ListChangedEventArgs e)
       at System.Windows.Forms.DataGridView.DataGridViewDataConnection.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)
       at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
       at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)
       at System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e)
       at System.Data.DataView.OnListChanged(ListChangedEventArgs e)
  InnerException: