]> git.saurik.com Git - wxWidgets.git/commitdiff
update the item width when making it bold, otherwise the selection highlight was...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Aug 2006 14:17:26 +0000 (14:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Aug 2006 14:17:26 +0000 (14:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 66822423d0625e95dd1e237cb6a223b7fffed72f..b0de2f9f2b1b28b3d0c98cd6459b1f64e862c0d3 100644 (file)
@@ -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);
     }
 }