X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bf2cac26a5502fa208a4a29dd60165cb1011aeca..6f7c5199ed9bc29507d426b13db9346bf1860005:/src/generic/dirdlgg.cpp diff --git a/src/generic/dirdlgg.cpp b/src/generic/dirdlgg.cpp index 2900942781..d7c41a3386 100644 --- a/src/generic/dirdlgg.cpp +++ b/src/generic/dirdlgg.cpp @@ -250,14 +250,14 @@ void wxGenericDirDialog::OnShowHidden( wxCommandEvent& event ) if (!m_dirCtrl) return; - m_dirCtrl->ShowHidden( event.GetInt() ); + m_dirCtrl->ShowHidden( event.GetInt() != 0 ); } void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) { wxTreeItemId id = m_dirCtrl->GetTreeCtrl()->GetSelection(); if ((id == m_dirCtrl->GetTreeCtrl()->GetRootItem()) || - (m_dirCtrl->GetTreeCtrl()->GetParent(id) == m_dirCtrl->GetTreeCtrl()->GetRootItem())) + (m_dirCtrl->GetTreeCtrl()->GetItemParent(id) == m_dirCtrl->GetTreeCtrl()->GetRootItem())) { wxMessageDialog msg(this, _("You cannot add a new directory to this section."), _("Create directory"), wxOK | wxICON_INFORMATION ); @@ -265,7 +265,7 @@ void wxGenericDirDialog::OnNew( wxCommandEvent& WXUNUSED(event) ) return; } - wxTreeItemId parent = id ; // m_dirCtrl->GetTreeCtrl()->GetParent( id ); + wxTreeItemId parent = id ; // m_dirCtrl->GetTreeCtrl()->GetItemParent( id ); wxDirItemData *data = (wxDirItemData*)m_dirCtrl->GetTreeCtrl()->GetItemData( parent ); wxASSERT( data );