]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
corrected CodeWarrior project target names and generated application names
[wxWidgets.git] / src / generic / treectlg.cpp
index 9f70f1240a3a376cb5052b0b326c85cf51b60ecb..ed745c827f1f28c55daf7d37f6d383ace3dc6997 100644 (file)
@@ -1804,7 +1804,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
 
     int offset = HasFlag(wxTR_ROW_LINES) ? 1 : 0;
 
 
     int offset = HasFlag(wxTR_ROW_LINES) ? 1 : 0;
 
-    if ( paintBg && image != NO_IMAGE)
+    if ( item->IsSelected() && image != NO_IMAGE)
     {
         // If it's selected, and there's an image, then we should
         // take care to leave the area under the image painted in the
     {
         // If it's selected, and there's an image, then we should
         // take care to leave the area under the image painted in the
@@ -1916,23 +1916,20 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
             }
         }
 
             }
         }
 
-        wxPen *pen = wxTRANSPARENT_PEN;
-        wxColour colText;
-
+        wxPen *pen;
+#ifndef __WXMAC__
+        // don't draw rect outline if we already have the background color
+        // under Max
         if ( item->IsSelected() )
         if ( item->IsSelected() )
-        {
             pen = wxBLACK_PEN;
             pen = wxBLACK_PEN;
-
-            if ( m_hasFocus )
-            {
-                colText = wxSystemSettings::
-                            GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT );
-            }
-
-#ifdef __WXMAC__
-            // no rect outline, we already have the background color
+        else
+#endif // !__WXMAC__
             pen = wxTRANSPARENT_PEN;
             pen = wxTRANSPARENT_PEN;
-#endif
+
+        wxColour colText;
+        if ( item->IsSelected() && m_hasFocus )
+        {
+            colText = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT );
         }
         else
         {
         }
         else
         {