Fixed the problem when canceling and opening again

This commit is contained in:
Konstantinos Vaggelakos 2011-12-06 22:52:56 +01:00
parent 26c29aef34
commit 64fbcd0492

View file

@ -58,10 +58,9 @@ namespace SparkleShare {
case PageType.Add:
tabControl.SelectedIndex = 1;
// Check whether the treeView is already created
// If it is dispose it and start over
if (treeView != null) {
CheckAddPage (null, null);
CheckTreeNode (null, null);
break;
treeView.Dispose();
}
// Set up the treeview
ImageList imageList = new ImageList ();
@ -97,7 +96,6 @@ namespace SparkleShare {
treeView.Select ();
CheckAddPage (null, null);
CheckTreeNode (null, null);
Console.WriteLine ("AddPage");
Show ();
break;
case PageType.Error: