X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9cf565e2a208e66faaf02571635499635d4501b2..7cda2aab67917c9dc2f2eeb87b2571a6a46ed22a:/src/generic/dirctrlg.cpp diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 56349938d9..f38afa7ce9 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -106,7 +106,7 @@ bool wxIsDriveAvailable(const wxString& dirName); // events // ---------------------------------------------------------------------------- -wxDEFINE_EVENT( wxEVT_COMMAND_DIRCTRL_CHANGED, wxTreeEvent ); +wxDEFINE_EVENT( wxEVT_DIRCTRL_CHANGED, wxTreeEvent ); // ---------------------------------------------------------------------------- // wxGetAvailableDrives, for WINDOWS, DOS, OS2, MAC, UNIX (returns "/") @@ -518,7 +518,7 @@ bool wxGenericDirCtrl::Create(wxWindow *parent, m_treeCtrl = CreateTreeCtrl(this, wxID_TREECTRL, wxPoint(0,0), GetClientSize(), treeStyle); - if (!filter.empty()) + if (!filter.empty() && (style & wxDIRCTRL_SHOW_FILTERS)) m_filterListCtrl = new wxDirFilterListCtrl(this, wxID_FILTERLISTCTRL); m_defaultPath = dir; @@ -703,7 +703,7 @@ void wxGenericDirCtrl::OnEndEditItem(wxTreeEvent &event) void wxGenericDirCtrl::OnTreeSelChange(wxTreeEvent &event) { - wxTreeEvent changedEvent(wxEVT_COMMAND_DIRCTRL_CHANGED, GetId()); + wxTreeEvent changedEvent(wxEVT_DIRCTRL_CHANGED, GetId()); changedEvent.SetEventObject(this); changedEvent.SetItem(event.GetItem()); @@ -1251,7 +1251,7 @@ void wxGenericDirCtrl::SetFilter(const wxString& filter) { m_filter = filter; - if (!filter.empty() && !m_filterListCtrl) + if (!filter.empty() && !m_filterListCtrl && HasFlag(wxDIRCTRL_SHOW_FILTERS)) m_filterListCtrl = new wxDirFilterListCtrl(this, wxID_FILTERLISTCTRL); else if (filter.empty() && m_filterListCtrl) {