Solved a bug in generic wxTreeCtrl whereby CalculatePositions was not completing

due to a missing '!', so scrollbars were not set properly. Tidied up wxMotif
scrollbar setting.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-12-18 18:22:43 +00:00
parent 63852e7836
commit 28ab302b70
4 changed files with 72 additions and 3 deletions

View File

@@ -779,6 +779,7 @@ void wxTreeCtrl::Expand(const wxTreeItemId& itemId)
}
item->Expand();
CalculatePositions();
RefreshSubtree(item);
@@ -890,7 +891,7 @@ void wxTreeCtrl::EnsureVisible(const wxTreeItemId& item)
m_anchor->GetSize( x, y );
y += 2*m_lineHeight;
int x_pos = GetScrollPos( wxHORIZONTAL );
SetScrollbars( 10, 10, x/10, y/10, x_pos, item_y/10 );
SetScrollbars( 10, 10, x/10, y/10, x_pos, item_y/10 );
return;
}
@@ -1381,8 +1382,10 @@ void wxTreeCtrl::CalculateLevel( wxGenericTreeItem *item,
item->SetY( y-m_lineHeight/3-2 );
item->SetHeight( m_lineHeight );
if ( item->IsExpanded() )
return;
// if ( item->IsExpanded() )
// return;
if ( !item->IsExpanded() ) // Surely this is correct? JACS
return;
wxArrayTreeItems& children = item->GetChildren();
size_t count = children.Count();