fixed bug in default filter string construction (you can't Printf() a string in itself)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -48,19 +48,16 @@ wxFileDialogBase::wxFileDialogBase(wxWindow *parent,
|
|||||||
m_message = message;
|
m_message = message;
|
||||||
m_dir = defaultDir;
|
m_dir = defaultDir;
|
||||||
m_fileName = defaultFile;
|
m_fileName = defaultFile;
|
||||||
m_wildCard = wildCard;
|
m_wildCard = wildCard.empty() ? wxFileSelectorDefaultWildcardStr : wildCard;
|
||||||
m_dialogStyle = style;
|
m_dialogStyle = style;
|
||||||
m_path = wxT("");
|
m_path = wxT("");
|
||||||
m_filterIndex = 0;
|
m_filterIndex = 0;
|
||||||
|
|
||||||
if (m_wildCard.IsEmpty())
|
|
||||||
m_wildCard = wxFileSelectorDefaultWildcardStr;
|
|
||||||
|
|
||||||
// convert m_wildCard from "*.bar" to "Files (*.bar)|*.bar"
|
// convert m_wildCard from "*.bar" to "Files (*.bar)|*.bar"
|
||||||
if ( m_wildCard.Find(wxT('|')) == wxNOT_FOUND )
|
if ( m_wildCard.Find(wxT('|')) == wxNOT_FOUND )
|
||||||
{
|
{
|
||||||
m_wildCard.Printf(_("Files (%s)|%s"),
|
m_wildCard = wxString::Format(_("Files (%s)|%s"),
|
||||||
m_wildCard.c_str(), m_wildCard.c_str());
|
m_wildCard.c_str(), m_wildCard.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user