]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
warning fix
[wxWidgets.git] / src / generic / treectlg.cpp
index 0b9e91d4e2935176ca4973c7230c912b8db2dc8e..6c61c9f6e4d21ec2ab521069a6ca5aaf10aa3ec2 100644 (file)
@@ -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() )
-        {
             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;
-#endif
+
+        wxColour colText;
+        if ( item->IsSelected() && m_hasFocus )
+        {
+            colText = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT );
         }
         else
         {
@@ -2317,8 +2314,8 @@ wxTreeItemId wxGenericTreeCtrl::HitTest(const wxPoint& point, int& flags)
 
     if (m_anchor)
         return m_anchor->HitTest( wxPoint(x, y), this, flags);
-    else
-        return wxTreeItemId();
+
+    return wxTreeItemId();
 }
 
 // get the bounding rectangle of the item (or of its label only)