From f2c3db9d7d22b57cf64c8671afe16d6739465120 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 12 Jun 2003 18:53:42 +0000 Subject: [PATCH] Patch #753465 a fix for Bug#750363. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21082 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/gizmos/splittree.cpp | 2 +- src/msw/treectrl.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/src/gizmos/splittree.cpp b/contrib/src/gizmos/splittree.cpp index 709d86f729..00f6902a03 100644 --- a/contrib/src/gizmos/splittree.cpp +++ b/contrib/src/gizmos/splittree.cpp @@ -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) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index bfe95ab1f7..5dcb0867c0 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -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) ) { -- 2.45.2