From 64fbcd0492501d0e502ca2146a76bcc8266a8b4a Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Tue, 6 Dec 2011 22:52:56 +0100 Subject: [PATCH] Fixed the problem when canceling and opening again --- SparkleShare/Windows/SparkleSetup.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SparkleShare/Windows/SparkleSetup.cs b/SparkleShare/Windows/SparkleSetup.cs index 1e186902..4910360c 100644 --- a/SparkleShare/Windows/SparkleSetup.cs +++ b/SparkleShare/Windows/SparkleSetup.cs @@ -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: