X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe6cf1284497c450735cdeb76cc99de9b18beb5f..4791fafb6d69dda73abc0a92c6a9ab19ce13801a:/src/generic/filedlgg.cpp diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index febc457bfe..55da3ff5ff 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -695,7 +695,7 @@ void wxFileCtrl::GoToHomeDir() void wxFileCtrl::GoToDir( const wxString &dir ) { - if (!wxDirExists(dir)) return; + if (!wxPathExists(dir)) return; m_dirName = dir; UpdateFiles(); @@ -915,7 +915,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent, { m_bypassGenericImpl = bypassGenericImpl; - if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFile, + if (!wxFileDialogBase::Create(parent, message, defaultDir, defaultFile, wildCard, style, pos)) { return false; @@ -1151,12 +1151,13 @@ void wxGenericFileDialog::SetWildcard(const wxString& wildCard) wildFilters); wxCHECK_RET( count, wxT("wxFileDialog: bad wildcard string") ); - size_t n, old_count = m_choice->GetCount(); - for ( n = 0; n < count; n++ ) + const size_t countOld = m_choice->GetCount(); + size_t n; + for ( n = 0; n < countOld; n++ ) { delete (wxString *)m_choice->GetClientData(n); } - + for ( n = 0; n < count; n++ ) { m_choice->Append( wildDescriptions[n], new wxString( wildFilters[n] ) ); @@ -1224,7 +1225,7 @@ void wxGenericFileDialog::OnSelected( wxListEvent &event ) if (!IsTopMostDir(dir)) dir += wxFILE_SEP_PATH; dir += filename; - if (wxDirExists(dir)) return; + if (wxPathExists(dir)) return; ignoreChanges = true; m_text->SetValue( filename ); @@ -1286,7 +1287,7 @@ void wxGenericFileDialog::HandleAction( const wxString &fn ) filename = dir; } - if (wxDirExists(filename)) + if (wxPathExists(filename)) { m_list->GoToDir( filename ); UpdateControls();