update the item width when making it bold, otherwise the selection highlight was too small after an item was made bold (and too big after it was reset to normal)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
22c9b21132
commit
3a1a76a8be
@ -1021,6 +1021,12 @@ void wxGenericTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
|
||||
if ( pItem->IsBold() != bold )
|
||||
{
|
||||
pItem->SetBold(bold);
|
||||
|
||||
// recalculate the item size as bold and non bold fonts have different
|
||||
// widths
|
||||
wxClientDC dc(this);
|
||||
CalculateSize(pItem, dc);
|
||||
|
||||
RefreshLine(pItem);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user