applied patch for calculating the tree items size with non default font (patch 520965)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-02-21 15:09:13 +00:00
parent 788519c605
commit 40e7f56c71

View File

@ -2896,7 +2896,10 @@ void wxGenericTreeCtrl::CalculateSize( wxGenericTreeItem *item, wxDC &dc )
wxCoord text_w = 0;
wxCoord text_h = 0;
if (item->IsBold())
wxTreeItemAttr *attr = item->GetAttributes();
if ( attr && attr->HasFont() )
dc.SetFont(attr->GetFont());
else if ( item->IsBold() )
dc.SetFont(m_boldFont);
dc.GetTextExtent( item->GetText(), &text_w, &text_h );