Fix CalculatePositions optimization (corrects #12435)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2011-02-16 21:35:13 +00:00
parent b8ea9cd583
commit c6eed10182

View File

@@ -1626,8 +1626,8 @@ wxTreeItemId wxGenericTreeCtrl::AddRoot(const wxString& text,
// into children
m_anchor->SetHasPlus();
m_anchor->Expand();
CalculatePositions();
}
CalculatePositions();
if (!HasFlag(wxTR_MULTIPLE))
{
@@ -3618,8 +3618,8 @@ void wxGenericTreeCtrl::CalculatePositions()
dc.SetFont( m_normalFont );
dc.SetPen( m_dottedPen );
//if(GetImageList() == NULL)
// m_lineHeight = (int)(dc.GetCharHeight() + 4);
m_anchor->CalculateSize(this, dc);
int y = 2;
CalculateLevel( m_anchor, dc, 0, y ); // start recursion