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:
@@ -1021,6 +1021,12 @@ void wxGenericTreeCtrl::SetItemBold(const wxTreeItemId& item, bool bold)
|
|||||||
if ( pItem->IsBold() != bold )
|
if ( pItem->IsBold() != bold )
|
||||||
{
|
{
|
||||||
pItem->SetBold(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);
|
RefreshLine(pItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user