From e0214f1f25894310d8aa777abd39b40d85b7a3e0 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 9 Jan 2008 14:56:22 +0000 Subject: [PATCH] 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 --- src/common/docview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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,