Browse Source

2007-02-27 Igor Zelmanovich <[email protected]>

	* TreeNodeCollection.cs: 'dirty' flag is assigned if 'marked' only 


svn path=/trunk/mcs/; revision=73478
Igor Zelmanovich 19 years ago
parent
commit
efc74eb316

+ 4 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,7 @@
+2007-02-27 Igor Zelmanovich <[email protected]>
+
+	* TreeNodeCollection.cs: 'dirty' flag is assigned if 'marked' only 
+
 2007-02-27 Igor Zelmanovich <[email protected]>
 
 	* BaseDataBoundControl.cs: setting DataSource to null does not 

+ 9 - 3
mcs/class/System.Web/System.Web.UI.WebControls/TreeNodeCollection.cs

@@ -122,7 +122,9 @@ namespace System.Web.UI.WebControls
 				}
 			}
 			items.Clear ();
-			dirty = true;
+			if (marked) {
+				dirty = true;
+			}
 		}
 		
 		public bool Contains (TreeNode child)
@@ -152,7 +154,9 @@ namespace System.Web.UI.WebControls
 			items.RemoveAt (i);
 			if (tree != null)
 				node.Tree = null;
-			dirty = true;
+			if (marked) {
+				dirty = true;
+			}
 		}
 		
 		public void RemoveAt (int index)
@@ -161,7 +165,9 @@ namespace System.Web.UI.WebControls
 			items.RemoveAt (index);
 			if (tree != null)
 				node.Tree = null;
-			dirty = true;
+			if (marked) {
+				dirty = true;
+			}
 		}
 		
 		public int Count {