X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9cf565e2a208e66faaf02571635499635d4501b2..07aaf32633ecf18ec3edfbb41793a112914792d0:/src/generic/dirctrlg.cpp diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 56349938d9..78f8ffc252 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -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; @@ -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) {