Reset the item's text in SetItemFont to ensure that the text will be
remeasured with the new font, and the bounding rect will be adjusted. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1172,6 +1172,10 @@ void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& font)
|
|||||||
|
|
||||||
attr->SetFont(font);
|
attr->SetFont(font);
|
||||||
|
|
||||||
|
// Reset the item's text to ensure that the bounding rect will be adjusted
|
||||||
|
// for the new font.
|
||||||
|
SetItemText(item, GetItemText(item));
|
||||||
|
|
||||||
RefreshItem(item);
|
RefreshItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user