Explorar o código

* TreeNode.cs: redraw the node when its image index is changed.

svn path=/trunk/mcs/; revision=55089
Jackson Harper %!s(int64=20) %!d(string=hai) anos
pai
achega
a8fa041179

+ 4 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,7 @@
+2006-01-04  Jackson Harper  <[email protected]>
+
+	* TreeNode.cs: redraw the node when its image index is changed.
+
 2006-01-04  Peter Dennis Bartok  <[email protected]>
 
 	* RichTextBox.cs: Same fix as last, just for SelectionColor. This

+ 8 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeNode.cs

@@ -211,7 +211,14 @@ namespace System.Windows.Forms {
 		[Localizable(true)]
 		public int ImageIndex {
 			get { return image_index; }
-			set { image_index = value; }
+			set {
+				if (image_index == value)
+					return;
+				image_index = value;
+				TreeView tree = TreeView;
+				if (tree != null)
+					tree.UpdateNode (this);
+			}
 		}
 
 		public bool IsEditing {