Fixed crash in EnsureVisible in wxTR_HIDE_ROOT mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1855,7 +1855,7 @@ void wxGenericTreeCtrl::EnsureVisible(const wxTreeItemId& item)
|
||||
|
||||
if ( HasFlag(wxTR_HIDE_ROOT) )
|
||||
{
|
||||
while ( parent != m_anchor )
|
||||
while ( parent && parent != m_anchor )
|
||||
{
|
||||
Expand(parent);
|
||||
parent = parent->GetParent();
|
||||
@@ -2815,6 +2815,7 @@ wxTreeItemId wxGenericTreeCtrl::HitTest(const wxPoint& point, int& flags)
|
||||
}
|
||||
|
||||
wxGenericTreeItem *hit = m_anchor->HitTest(CalcUnscrolledPosition(point),
|
||||
// wxGenericTreeItem *hit = m_anchor->HitTest(point,
|
||||
this, flags, 0);
|
||||
if (hit == NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user