Don't ignore path when prompting for file in SaveAs()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2008-01-09 14:56:22 +00:00
parent 1606607aa9
commit e0214f1f25

View 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,