Преглед на файлове

* TreeView.cs: Dont try to unhighlight the selected node if
* there
isn't a selected node.


svn path=/trunk/mcs/; revision=76037

Jackson Harper преди 19 години
родител
ревизия
e04c61384f

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

@@ -1,3 +1,8 @@
+2007-04-21  Jackson Harper  <[email protected]>
+
+	* TreeView.cs: Dont try to unhighlight the selected node if there
+	isn't a selected node.
+
 2007-04-21  Jackson Harper  <[email protected]>
 
 	* UpDownBase.cs:

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

@@ -1828,7 +1828,7 @@ namespace System.Windows.Forms {
 			if (!select_mmove)
 				return;
 
-			if (e.Button == MouseButtons.Right) {
+			if (e.Button == MouseButtons.Right && selected_node != null) {
 				Invalidate (highlighted_node.Bounds);
 				highlighted_node = selected_node;
 				Invalidate (selected_node.Bounds);