diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-01-16 01:44:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-16 21:33:29 +0100 |
| commit | 127bdaa2d8a869112fd6ec908cf115f391dbba24 (patch) | |
| tree | f1878f27421d80694e28b46f4d609ae51ebebc29 /src/wx/export_subtitles_dialog.cc | |
| parent | c64b6891f6e28c1a7f11871d3dcccdfe75944644 (diff) | |
Remember some more paths when selecting files (#2728).
* export subtitles
* export video
* debug log
* cinema database
* config file
Diffstat (limited to 'src/wx/export_subtitles_dialog.cc')
| -rw-r--r-- | src/wx/export_subtitles_dialog.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/wx/export_subtitles_dialog.cc b/src/wx/export_subtitles_dialog.cc index ade58b3fb..9baa1396e 100644 --- a/src/wx/export_subtitles_dialog.cc +++ b/src/wx/export_subtitles_dialog.cc @@ -58,7 +58,7 @@ ExportSubtitlesDialog::ExportSubtitlesDialog (wxWindow* parent, int reels, bool wxString const wildcard = _interop ? _("Subtitle files (.xml)|*.xml") : _("Subtitle files (.mxf)|*.mxf"); _file_label = add (_("Output file"), true); - _file = new FilePickerCtrl (this, _("Select output file"), wildcard, false, true); + _file = new FilePickerCtrl(this, _("Select output file"), wildcard, false, true, "ExportSubtitlesPath"); add (_file); _dir_label = add (_("Output folder"), true); @@ -97,9 +97,11 @@ boost::filesystem::path ExportSubtitlesDialog::path () const { if (_file->IsEnabled()) { - wxFileName fn(std_to_wx(_file->path().string())); - fn.SetExt (_interop ? "xml" : "mxf"); - return wx_to_std (fn.GetFullPath()); + if (auto path = _file->path()) { + wxFileName fn(std_to_wx(path->string())); + fn.SetExt(_interop ? "xml" : "mxf"); + return wx_to_std(fn.GetFullPath()); + } } return wx_to_std (_dir->GetPath()); |
