This project is read-only.

Groups and Layers

May 14, 2011 at 8:38 AM
Edited May 15, 2011 at 11:46 AM

Hi!

Now the last release of DSP works fine with layers within groups, also save and open dspx file works ok.
But after removing a group or a layer from legend and then click to one of existing item in the legend I receive below message.

This happens only on group with layers after I reload dspx file. When I create one group with layers and then try to remove it this works ok.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at DotSpatial.Controls.Legend.ClearSelection() in C:\DotSpatial_f9b594cae9af\DotSpatial.Controls\DotSpatial.Controls\Legend.cs:line 175
   at DotSpatial.Controls.Legend.DoItemMouseDown(ItemMouseEventArgs e) in C:\DotSpatial_f9b594cae9af\DotSpatial.Controls\DotSpatial.Controls\Legend.cs:line 1017
   at DotSpatial.Controls.Legend.OnMouseDown(MouseEventArgs e) in C:\DotSpatial_f9b594cae9af\DotSpatial.Controls\DotSpatial.Controls\Legend.cs:line 704
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)


Also when open and remove the same TIF image (size 77MB) the third time program reports Out of memory.

 

Thanks for any help on this, Vojko

 

May 15, 2011 at 11:45 AM
Edited May 15, 2011 at 11:46 AM

Found the problem. Instead to insert the code for openning map dspx file into MainForm_Load event it must be in the MainForm_Activated event.

Thanks.