X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da87911d658e7dd7f08936b3f52fed9ab17a5712..fe8635a7e78715344f0f4b6abc9d797931429333:/src/generic/treectlg.cpp?ds=sidebyside diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 66822423d0..b0de2f9f2b 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -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); } }