call gtk_file_chooser_set_current_folder even if the default file name is empty (but default directory isn't) (bug 1701682)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
831faf970a
commit
3a41827a6d
@ -234,17 +234,14 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
|
|||||||
fn.AssignDir(defaultDir);
|
fn.AssignDir(defaultDir);
|
||||||
|
|
||||||
// set the initial file name and/or directory
|
// set the initial file name and/or directory
|
||||||
wxString fname = fn.GetFullName();
|
const wxString dir = fn.GetPath();
|
||||||
if ( fname.empty() )
|
if ( !dir.empty() )
|
||||||
{
|
{
|
||||||
wxString dir = fn.GetPath();
|
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
|
||||||
if ( !dir.empty() )
|
dir.fn_str());
|
||||||
{
|
|
||||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
|
|
||||||
dir.fn_str());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const wxString fname = fn.GetFullName();
|
||||||
if ( style & wxFD_SAVE )
|
if ( style & wxFD_SAVE )
|
||||||
{
|
{
|
||||||
if ( !fname.empty() )
|
if ( !fname.empty() )
|
||||||
|
Loading…
Reference in New Issue
Block a user