From 2bd162773db825bb93fba4333210c5cdc5c930da Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 23 Dec 2006 00:10:15 +0000 Subject: [PATCH] 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 --- src/msw/treectrl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 92dc2fce7d..8eb9799301 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -1172,6 +1172,10 @@ void wxTreeCtrl::SetItemFont(const wxTreeItemId& item, const wxFont& 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); } -- 2.45.2