]> git.saurik.com Git - wxWidgets.git/commitdiff
Patch #753465 a fix for Bug#750363.
authorRobin Dunn <robin@alldunn.com>
Thu, 12 Jun 2003 18:53:42 +0000 (18:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 12 Jun 2003 18:53:42 +0000 (18:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/gizmos/splittree.cpp
src/msw/treectrl.cpp

index 709d86f729ab5bb2d363a88cd81aeea115df4506..00f6902a03fee378f0687a9e58a2164b92aad0c5 100644 (file)
@@ -311,7 +311,7 @@ void wxRemotelyScrolledTreeCtrl::AdjustRemoteScrollbars()
         if (scrolledWindow)
         {
             wxRect itemRect;
-            if (GetBoundingRect(GetRootItem(), itemRect))
+            if (GetBoundingRect(GetFirstVisibleItem(), itemRect))
             {
                 // Actually, the real height seems to be 1 less than reported
                 // (e.g. 16 instead of 16)
index bfe95ab1f7d8a8825ab5d18a2a4c74d9de3a3a68..5dcb0867c0c8e4c112dedaae6107c402c21efa02 100644 (file)
@@ -1921,6 +1921,13 @@ bool wxTreeCtrl::GetBoundingRect(const wxTreeItemId& item,
                                  bool textOnly) const
 {
     RECT rc;
+
+    // Virtual root items have no bounding rectangle
+    if ( IS_VIRTUAL_ROOT(item) )
+    {
+        return false;
+    }
+
     if ( TreeView_GetItemRect(GetHwnd(), HITEM(item),
                               &rc, textOnly) )
     {