]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for my fix
authorJulian Smart <julian@anthemion.co.uk>
Sat, 23 Apr 2005 20:13:13 +0000 (20:13 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 23 Apr 2005 20:13:13 +0000 (20:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 5d23d010161fa521bb97848135966219d22bda7f..c32ebbbe8fbe1a733d4cd0caf621fd00bff61429 100644 (file)
@@ -2255,7 +2255,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
     }
 
     int total_h = GetLineHeight(item);
     }
 
     int total_h = GetLineHeight(item);
-    bool hasCustomBackground = false;
+    bool drawItemBackground = false;
 
     if ( item->IsSelected() )
     {
 
     if ( item->IsSelected() )
     {
@@ -2273,13 +2273,14 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
 #else
         dc.SetBrush(*(m_hasFocus ? m_hilightBrush : m_hilightUnfocusedBrush));
 #endif
 #else
         dc.SetBrush(*(m_hasFocus ? m_hilightBrush : m_hilightUnfocusedBrush));
 #endif
+        drawItemBackground = true;
     }
     else
     {
         wxColour colBg;
         if ( attr && attr->HasBackgroundColour() )
        {
     }
     else
     {
         wxColour colBg;
         if ( attr && attr->HasBackgroundColour() )
        {
-           hasCustomBackground = true;
+           drawItemBackground = true;
             colBg = attr->GetBackgroundColour();
        }
         else
             colBg = attr->GetBackgroundColour();
        }
         else
@@ -2310,7 +2311,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
         // On GTK+ 2, drawing a 'normal' background is wrong for themes that
         // don't allow backgrounds to be customized. Not drawing the background,
         // except for custom item backgrounds, works for both kinds of theme.
         // On GTK+ 2, drawing a 'normal' background is wrong for themes that
         // don't allow backgrounds to be customized. Not drawing the background,
         // except for custom item backgrounds, works for both kinds of theme.
-        else if (hasCustomBackground)
+        else if (drawItemBackground)
         {
             dc.DrawRectangle( item->GetX()-2, item->GetY()+offset,
                               item->GetWidth()+2, total_h-offset );
         {
             dc.DrawRectangle( item->GetX()-2, item->GetY()+offset,
                               item->GetWidth()+2, total_h-offset );