Author: calberto
Date: 2007-09-21 20:15:25 -0400 (Fri, 21 Sep 2007)
New Revision: 86188
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeNode.cs
Log:
2007-09-21 Carlos Alberto Cortez <[EMAIL PROTECTED]>
* TreeNode.cs: When collapsing or expanding a node, check whether its
change will affect the visible area (we were previously doing a
IsVisible check, but that check is not enough since children nodes
could be still visible). Fixes part of #325266.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-09-21 23:51:39 UTC (rev 86187)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-09-22 00:15:25 UTC (rev 86188)
@@ -1,3 +1,10 @@
+2007-09-21 Carlos Alberto Cortez <[EMAIL PROTECTED]>
+
+ * TreeNode.cs: When collapsing or expanding a node, check whether its
+ change will affect the visible area (we were previously doing a
+ IsVisible check, but that check is not enough since children nodes
+ could be still visible). Fixes part of #325266.
+
2007-09-21 Jonathan Pobst <[EMAIL PROTECTED]>
* TreeView.cs: Always select the first node when the TreeView gets
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeNode.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeNode.cs
2007-09-21 23:51:39 UTC (rev 86187)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeNode.cs
2007-09-22 00:15:25 UTC (rev 86188)
@@ -896,7 +896,8 @@
tree_view.RecalculateVisibleOrder
(this);
tree_view.UpdateScrollBars (false);
- if (IsVisible)
+ // ExpandBelow if we affect the visible
area
+ if (visible_order <
tree_view.skipped_nodes + tree_view.VisibleCount && ArePreviousNodesExpanded)
tree_view.ExpandBelow (this,
count_to_next);
}
}
@@ -931,7 +932,8 @@
tree_view.RecalculateVisibleOrder
(this);
tree_view.UpdateScrollBars (false);
- if (IsVisible)
+ // CollapseBelow if we affect the
visible area
+ if (visible_order <
tree_view.skipped_nodes + tree_view.VisibleCount && ArePreviousNodesExpanded)
tree_view.CollapseBelow (this,
count_to_next);
if(!byInternal && HasFocusInChildren ())
tree_view.SelectedNode = this;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches