void wxFileData::MakeItem( wxListItem &item )
{
item.m_text = m_name;
+ item.ClearAttributes();
if (IsExe()) item.SetTextColour(*wxRED);
if (IsDir()) item.SetTextColour(*wxBLUE);
item.m_image = IsDir() ? 0 : -1;
m_dialogStyle = style;
if ((m_dialogStyle & wxMULTIPLE ) && !(m_dialogStyle & wxOPEN))
- m_dialogStyle &= ~wxMULTIPLE;
+ m_dialogStyle |= wxOPEN;
m_dir = defaultDir;
if (m_dir.IsEmpty())
void wxFileDialog::GetPaths( wxArrayString& paths ) const
{
paths.Empty();
+ if (m_list->GetSelectedItemCount() == 0)
+ {
+ paths.Add( GetPath() );
+ return;
+ }
+
paths.Alloc( m_list->GetSelectedItemCount() );
wxString dir;
void wxFileDialog::GetFilenames(wxArrayString& files) const
{
files.Empty();
+ if (m_list->GetSelectedItemCount() == 0)
+ {
+ files.Add( GetFilename() );
+ return;
+ }
files.Alloc( m_list->GetSelectedItemCount() );
wxListItem item;