Fix tree size calculation by using logical item position
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -113,6 +113,10 @@ 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
|
||||||
|
rect.x += treeCtrl->GetScrollPos(wxHORIZONTAL);
|
||||||
|
rect.y += treeCtrl->GetScrollPos(wxVERTICAL);
|
||||||
|
|
||||||
size.IncTo(wxSize(rect.GetRight(), rect.GetBottom()));
|
size.IncTo(wxSize(rect.GetRight(), rect.GetBottom()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user