[Monodevelop-patches-list] r552 - trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 18 16:28:13 EST 2004


Author: pedroas
Date: 2004-01-18 16:28:13 -0500 (Sun, 18 Jan 2004)
New Revision: 552

Modified:
   trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNodeCollection.cs
Log:
Bugfix: Clear() was wrong


Modified: trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNodeCollection.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNodeCollection.cs	2004-01-18 21:24:41 UTC (rev 551)
+++ trunk/MonoDevelop/src/Libraries/MonoDevelop.Gui/Tree/TreeNodeCollection.cs	2004-01-18 21:28:13 UTC (rev 552)
@@ -56,11 +56,10 @@
 
 		public virtual void Clear() 
 		{
-			foreach (TreeNode node in list) {
-				Removed(node);
+			ArrayList tmp = (ArrayList)list.Clone();
+			foreach (TreeNode node in tmp) {
+				Remove(node);
 			}
-
-			list.Clear();
 		}
 		
 		public bool Contains(TreeNode node) 




More information about the Monodevelop-patches-list mailing list