From af447a87c3d7ec899bdfb9322c15258d361cf2f5 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 3 Aug 2017 06:41:38 -0400 Subject: [PATCH] Remove another use of cwd for default opening paths --- src/BatchProcessDialog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/BatchProcessDialog.cpp b/src/BatchProcessDialog.cpp index b5138fa97..6bd87eacf 100644 --- a/src/BatchProcessDialog.cpp +++ b/src/BatchProcessDialog.cpp @@ -50,6 +50,7 @@ #include "AllThemeResources.h" #include "FileDialog.h" +#include "FileNames.h" #include "import/Import.h" #define ChainsListID 7001 @@ -237,7 +238,6 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event)) return; } - wxString path = gPrefs->Read(wxT("/DefaultOpenPath"), ::wxGetCwd()); wxString prompt = _("Select file(s) for batch processing..."); FormatList l; @@ -279,6 +279,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event)) } } + auto path = FileNames::FindDefaultPath(FileNames::Operation::Open); FileDialog dlog(this, prompt, path, @@ -290,7 +291,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event)) if (dlog.ShowModal() != wxID_OK) { return; } - + wxArrayString files; dlog.GetPaths(files);