]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fldlgcmn.cpp
removed invalid restriction
[wxWidgets.git] / src / common / fldlgcmn.cpp
index a6431eba6373baf683522408dcfc3a589c86d799..c9d8e15494ec59745c43c6436ba8db78329df270 100644 (file)
@@ -45,13 +45,14 @@ wxFileDialogBase::wxFileDialogBase(wxWindow *parent,
                                    const wxPoint& WXUNUSED(pos))
                 : m_message(message),
                   m_dir(defaultDir),
-                  m_fileName(defaultFile)
+                  m_fileName(defaultFile),
+                  m_wildCard(wildCard)
 {
     m_parent = parent;
     m_dialogStyle = style;
     m_filterIndex = 0;
 
-    if ( wildCard.empty() )
+    if ( wildCard.empty() || wildCard == wxFileSelectorDefaultWildcardStr )
     {
         m_wildCard = wxString::Format(_("All files (%s)|%s"),
                                       wxFileSelectorDefaultWildcardStr,
@@ -71,9 +72,9 @@ wxFileDialogBase::wxFileDialogBase(wxWindow *parent,
             m_wildCard = wxString::Format
                          (
                             _("%s files (%s)|%s"),
-                            m_wildCard.c_str() + nDot,
-                            m_wildCard.c_str(),
-                            m_wildCard.c_str()
+                            wildCard.c_str() + nDot,
+                            wildCard.c_str(),
+                            wildCard.c_str()
                          );
         }
     }