- wxString tmp = wxFileSelector(_("Save as"),
- docTemplate->GetDirectory(),
+ wxString defaultDir = docTemplate->GetDirectory();
+ if (defaultDir.IsEmpty())
+ defaultDir = wxPathOnly(GetFilename());
+
+ wxString tmp = wxFileSelector(_("Save As"),
+ defaultDir,