]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/treebase.cpp
copy setup.h from setup0.h
[wxWidgets.git] / src / common / treebase.cpp
index d4244576a76b7f47855de1f90d353e10bacefb40..38d242bf063267c577be5b432f2fea0ef96c50a6 100644 (file)
@@ -113,6 +113,12 @@ wxGetBestTreeSize(const wxTreeCtrlBase* treeCtrl, wxTreeItemId id, wxSize& size)
 
     if ( treeCtrl->GetBoundingRect(id, rect, true /* just the item */) )
     {
 
     if ( treeCtrl->GetBoundingRect(id, rect, true /* just the item */) )
     {
+        // Translate to logical position so we get the full extent
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+        rect.x += treeCtrl->GetScrollPos(wxHORIZONTAL);
+        rect.y += treeCtrl->GetScrollPos(wxVERTICAL);
+#endif
+
         size.IncTo(wxSize(rect.GetRight(), rect.GetBottom()));
     }
 
         size.IncTo(wxSize(rect.GetRight(), rect.GetBottom()));
     }