]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
there is no sqrt(int) in standard C++ (although glibc seems to provide it); select...
[wxWidgets.git] / src / generic / treectlg.cpp
index 0e14dc28301b8dbf1d2c420011c28cc2fb00643a..52868f92265551d5f81a472282f5e1f6bb7bf4fc 100644 (file)
@@ -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();