diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 6c364c1438..7f37a56f55 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -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,