Patch #753465 a fix for Bug#750363.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-06-12 18:53:42 +00:00
parent fbb447e2c4
commit e5125b7488
2 changed files with 11 additions and 4 deletions

View File

@@ -314,7 +314,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)

View File

@@ -1914,6 +1914,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) )
{