From c6eed1018276f014fa4bd825a4ba04a688cf378c Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 16 Feb 2011 21:35:13 +0000 Subject: [PATCH] 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 --- src/generic/treectlg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 2d0a2a3211..73eda71171 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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