X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..721a4a08bce5245dd748a9f4c64c5d25a02e8155:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 113dbba584..2650eac81d 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1485,6 +1485,17 @@ void wxGenericTreeCtrl::SelectItem(const wxTreeItemId& itemId, if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) return; + wxTreeItemId parent = GetParent( itemId ); + while (parent.IsOk()) + { + if (!IsExpanded(parent)) + Expand( parent ); + + parent = GetParent( parent ); + } + + EnsureVisible( itemId ); + // ctrl press if (unselect_others) { @@ -1910,8 +1921,13 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level { colText = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_HIGHLIGHTTEXT ); +#ifdef __WXMAC__ + // no rect outline, we already have the background color + pen = wxTRANSPARENT_PEN; +#else if ( m_hasFocus ) pen = wxBLACK_PEN; +#endif } else