diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-12-16 12:10:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-12-16 12:10:51 +0000 |
| commit | 532e7faa6ab37681999d1cbb0e9f8b6978198622 (patch) | |
| tree | 43ea916af86201d08c7f1aaf7b8f02f1aa021920 /src/wx/kdm_output_panel.cc | |
| parent | 396c26415da57f42271ddcf56c1169a437d5a981 (diff) | |
Add preference for default KDM target directory (#1013).
Diffstat (limited to 'src/wx/kdm_output_panel.cc')
| -rw-r--r-- | src/wx/kdm_output_panel.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc index 3919e6ceb..a36c82024 100644 --- a/src/wx/kdm_output_panel.cc +++ b/src/wx/kdm_output_panel.cc @@ -81,7 +81,12 @@ KDMOutputPanel::KDMOutputPanel (wxWindow* parent, bool interop) _folder = new wxDirPickerCtrl (this, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1)); #endif - _folder->SetPath (wxStandardPaths::Get().GetDocumentsDir()); + boost::optional<boost::filesystem::path> path = Config::instance()->default_kdm_directory (); + if (path) { + _folder->SetPath (std_to_wx (path->string ())); + } else { + _folder->SetPath (wxStandardPaths::Get().GetDocumentsDir()); + } table->Add (_folder, 1, wxEXPAND); |
