X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/419875a6f5efa6c16b75d4a5e104ae6d88ed08fc..d31d30d791201146a5e224d3bf0f0cd909300bba:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 0e14dc2830..52868f9226 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -877,10 +877,6 @@ wxGenericTreeItem::DoCalculateSize(wxGenericTreeCtrl* control, else state_w += MARGIN_BETWEEN_IMAGE_AND_TEXT; } - else - { - state = wxTREE_ITEMSTATE_NONE; - } } m_height = (image_h > text_h) ? image_h : text_h; @@ -2465,6 +2461,7 @@ int wxGenericTreeCtrl::GetLineHeight(wxGenericTreeItem *item) const void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc) { item->SetFont(this, dc); + item->CalculateSize(this, dc); wxCoord text_h = item->GetTextHeight();