X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12c1b46a2f848ce995590997d5a28559ee6e3ae9..77611ad4da9df336a0805508276a81b8f4437107:/src/generic/filedlgg.cpp diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 5a6e892e78..0026835965 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -688,12 +688,12 @@ void wxFileCtrl::OnListDeleteAllItems( wxListEvent &WXUNUSED(event) ) item.m_mask = wxLIST_MASK_DATA; item.m_itemId = GetNextItem( -1, wxLIST_NEXT_ALL ); - while ( item.m_itemId != -1 ) + while ( item.m_itemId != -1 ) { GetItem( item ); wxFileData *fd = (wxFileData*)item.m_data; delete fd; - item.m_data = (void*) NULL; + item.m_data = 0; SetItem( item ); item.m_itemId = GetNextItem( item.m_itemId, wxLIST_NEXT_ALL ); } @@ -928,9 +928,11 @@ wxFileDialog::wxFileDialog(wxWindow *parent, Centre( wxBOTH ); +/* if (m_fileName.IsEmpty()) m_list->SetFocus(); else +*/ m_text->SetFocus(); wxEndBusyCursor(); @@ -1171,7 +1173,7 @@ void wxFileDialog::GetPaths( wxArrayString& paths ) const item.m_mask = wxLIST_MASK_TEXT; item.m_itemId = m_list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - while ( item.m_itemId != -1 ) + while ( item.m_itemId != -1 ) { m_list->GetItem( item ); paths.Add( dir + item.m_text ); @@ -1194,7 +1196,7 @@ void wxFileDialog::GetFilenames(wxArrayString& files) const item.m_mask = wxLIST_MASK_TEXT; item.m_itemId = m_list->GetNextItem( -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED ); - while ( item.m_itemId != -1 ) + while ( item.m_itemId != -1 ) { m_list->GetItem( item ); files.Add( item.m_text );