windrobin / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 1 forks source link

TreeView Exception #68

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
if i try to CHECK a folder in treeview that has multiple folders inside with 
placemarks inside those seconds folders it generates a exception.
I belive this is because the load kml is made async therefore when i check the 
first one he knows he have childs but dont know if the first element childs 
also have childs there for a error occurs when he trys to change first element 
grandchilds visibility.

What is the expected output? What do you see instead?
expected output was to load all node childs upon change of visibility.

What version of the product are you using? On what operating system?
svn r435 Win xp profissional  vs2010

Please provide any additional information below.

would be great to have a option to load async the rest of the tree but not 
uppon click, just overtime, maybe upon backgroundworker_complete.

Oh btw i made a workaround in the error in 

 internal bool ApiObjectVisible
        {
            get
            {
                try
                {
                    return Convert.ToBoolean(this.ApiObject.getVisibility());
                }
                catch (COMException)
                {
                    ////Debug.WriteLine("ApiObjectVisible: " + cex.Message, "KmlTreeViewNode");
                    return false;
                }
            }

            set
            {
                try
                {
                    if(this.ApiObject != null)
                    this.ApiObject.setVisibility(Convert.ToUInt16(value));
                }
                catch (COMException)
                {
                }
            }
        }

adding the following code line ( if(this.ApiObject != null) ) before the 
setVisibility

Thanks in advanced.

Original issue reported on code.google.com by pedro.le...@gmail.com on 17 Jan 2012 at 4:43

GoogleCodeExporter commented 9 years ago
Hi,

Thanks a lot for this, this bug was introduced when the treeview became 
'virtual' -I think I have fixed this with a new treeview model async 
methods...will post when I test and next commit.

Regards,

Fraser

Original comment by fraser.c...@gmail.com on 5 Feb 2012 at 10:34

GoogleCodeExporter commented 9 years ago

Original comment by fraser.c...@gmail.com on 8 Feb 2012 at 6:22