]> git.saurik.com Git - wxWidgets.git/commitdiff
call gtk_file_chooser_set_current_folder even if the default file name is empty ...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Apr 2007 18:21:46 +0000 (18:21 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 16 Apr 2007 18:21:46 +0000 (18:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/filedlg.cpp

index 25a5ceba6488715317b588f12158d3904841e8a5..65cf3a2de64560e42f568205c689a4c05a8f2917 100644 (file)
@@ -234,17 +234,14 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
         fn.AssignDir(defaultDir);
 
     // set the initial file name and/or directory
         fn.AssignDir(defaultDir);
 
     // set the initial file name and/or directory
-    wxString fname = fn.GetFullName();
-    if ( fname.empty() )
+    const wxString dir = fn.GetPath();
+    if ( !dir.empty() )
     {
     {
-        wxString dir = fn.GetPath();
-        if ( !dir.empty() )
-        {
-            gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
-                                                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 ( !fname.empty() )
     if ( style & wxFD_SAVE )
     {
         if ( !fname.empty() )