]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
1. changed wxColourData default palette to NULL colours instead of white
[wxWidgets.git] / src / generic / treectlg.cpp
index c7cfd6b8549f16fa1fbc7296eae79248ccf3a9ed..4a83697fd7da58f52c6dad9df7816bd3b0a53f31 100644 (file)
@@ -1878,6 +1878,8 @@ size_t wxGenericTreeCtrl::GetSelections(wxArrayTreeItemIds &array) const
 
 void wxGenericTreeCtrl::EnsureVisible(const wxTreeItemId& item)
 {
+    wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
+
     if (!item.IsOk()) return;
 
     wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem;
@@ -2482,7 +2484,7 @@ void wxGenericTreeCtrl::DrawLine(const wxTreeItemId &item, bool below)
 }
 
 // -----------------------------------------------------------------------------
-// wxWindows callbacks
+// wxWidgets callbacks
 // -----------------------------------------------------------------------------
 
 void wxGenericTreeCtrl::OnPaint( wxPaintEvent &WXUNUSED(event) )
@@ -3446,11 +3448,17 @@ void wxGenericTreeCtrl::OnGetToolTip( wxTreeEvent &event )
 // be removed, as well as the #else case below.
 #define _USE_VISATTR 0
 
+#if _USE_VISATTR
 #include "wx/listbox.h"
+#endif
 
 //static
 wxVisualAttributes
+#if _USE_VISATTR
 wxGenericTreeCtrl::GetClassDefaultAttributes(wxWindowVariant variant)
+#else
+wxGenericTreeCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+#endif
 {
 #if _USE_VISATTR
     // Use the same color scheme as wxListBox