]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix tree size calculation by using logical item position
authorJulian Smart <julian@anthemion.co.uk>
Sat, 25 Nov 2006 21:12:31 +0000 (21:12 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 25 Nov 2006 21:12:31 +0000 (21:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/treebase.cpp

index d4244576a76b7f47855de1f90d353e10bacefb40..4eebd5fa094fa342a4f5a6e02a145a041b4f073e 100644 (file)
@@ -113,6 +113,10 @@ wxGetBestTreeSize(const wxTreeCtrlBase* treeCtrl, wxTreeItemId id, wxSize& size)
 
     if ( treeCtrl->GetBoundingRect(id, rect, true /* just the item */) )
     {
+        // Translate to logical position so we get the full extent
+        rect.x += treeCtrl->GetScrollPos(wxHORIZONTAL);
+        rect.y += treeCtrl->GetScrollPos(wxVERTICAL);
+
         size.IncTo(wxSize(rect.GetRight(), rect.GetBottom()));
     }