]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
Applied patch #1875242 - fixing more bugs related to using OS/2's DevQueryCaps
[wxWidgets.git] / src / common / docview.cpp
index 6c364c14382c1dc87e53d38129f4c51fe229055a..7f37a56f550004c905a9ad3929b9ae3cc328b22a 100644 (file)
@@ -298,8 +298,12 @@ bool wxDocument::SaveAs()
 #else
     wxString filter = docTemplate->GetFileFilter() ;
 #endif
+    wxString defaultDir = docTemplate->GetDirectory();
+    if (defaultDir.IsEmpty())
+        defaultDir = wxPathOnly(GetFilename());
+
     wxString tmp = wxFileSelector(_("Save As"),
-            docTemplate->GetDirectory(),
+            defaultDir,
             wxFileNameFromPath(GetFilename()),
             docTemplate->GetDefaultExtension(),
             filter,