summaryrefslogtreecommitdiff
path: root/src/wx/export_video_file_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-01-16 01:44:49 +0100
committerCarl Hetherington <cth@carlh.net>2024-01-16 21:33:29 +0100
commit127bdaa2d8a869112fd6ec908cf115f391dbba24 (patch)
treef1878f27421d80694e28b46f4d609ae51ebebc29 /src/wx/export_video_file_dialog.cc
parentc64b6891f6e28c1a7f11871d3dcccdfe75944644 (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_video_file_dialog.cc')
-rw-r--r--src/wx/export_video_file_dialog.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wx/export_video_file_dialog.cc b/src/wx/export_video_file_dialog.cc
index 8b01282b6..611985602 100644
--- a/src/wx/export_video_file_dialog.cc
+++ b/src/wx/export_video_file_dialog.cc
@@ -96,8 +96,7 @@ ExportVideoFileDialog::ExportVideoFileDialog (wxWindow* parent, string name)
need to check if foo.mov (or similar) exists. I can't find a way to make wxWidgets do this,
so disable its check and the caller will have to do it themselves.
*/
- _file = new FilePickerCtrl (this, _("Select output file"), format_filters[0], false, false);
- _file->set_path(_initial_name);
+ _file = new FilePickerCtrl(this, _("Select output file"), format_filters[0], false, false, "ExportVideoPath", _initial_name);
add (_file);
for (int i = 0; i < FORMATS; ++i) {
@@ -168,7 +167,6 @@ ExportVideoFileDialog::format_changed ()
auto const selection = _format->GetSelection();
DCPOMATIC_ASSERT (selection >= 0 && selection < FORMATS);
_file->set_wildcard(format_filters[selection]);
- _file->set_path(_initial_name);
_x264_crf->Enable (formats[selection] == ExportFormat::H264_AAC);
for (int i = 0; i < 2; ++i) {
_x264_crf_label[i]->Enable(formats[selection] == ExportFormat::H264_AAC);
@@ -180,7 +178,9 @@ ExportVideoFileDialog::format_changed ()
boost::filesystem::path
ExportVideoFileDialog::path () const
{
- wxFileName fn(std_to_wx(_file->path().string()));
+ auto path = _file->path();
+ DCPOMATIC_ASSERT(path);
+ wxFileName fn(std_to_wx(path->string()));
fn.SetExt (format_extensions[_format->GetSelection()]);
return wx_to_std (fn.GetFullPath());
}