2007-09-28 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Fri, 28 Sep 2007 21:06:26 +0000 (21:06 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Fri, 28 Sep 2007 21:06:26 +0000 (21:06 -0000)
* TreeView.cs: When calling ExpandAll, don't move the scroll to the
bottom area if we are in fact not using the vertical scroll bar.
Fixes #324824.

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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TreeView.cs

index e74735ce1cf964ccbf54f3ca756e35c5e385443b..ecbcda3e0ebc33804aa56868f97fa3df22726b33 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-28  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * TreeView.cs: When calling ExpandAll, don't move the scroll to the 
+       bottom area if we are in fact not using the vertical scroll bar.
+       Fixes #324824.
+
 2007-09-27  Jonathan Pobst  <monkey@jpobst.com>
 
        * Control.cs: Comment out a double buffering optimization that doesn't
index f097064523d4f4ecfe8fcb150c3322e964e7b1f2..e25fc17691c2c54c866e0a80ead2217ba6bcc05b 100644 (file)
@@ -764,7 +764,7 @@ namespace System.Windows.Forms {
                        if (!found)
                                return;
 
-                       if (IsHandleCreated) {
+                       if (IsHandleCreated && vbar.VisibleInternal) {
                                vbar.Value = vbar.Maximum - VisibleCount + 1;
                        } else {
                                RecalculateVisibleOrder (root_node);