diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/dcp_panel.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index 5ee65804d..4d2ee12b9 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -998,6 +998,13 @@ DCPPanel::add_audio_panel_to_grid () void DCPPanel::copy_isdcf_name_button_clicked () { + auto name = _film->name(); + if (name.length() > 20 && std::count(name.begin(), name.end(), '_') > 6) { + /* At a guess, the existing film name is itself an ISDCF name, so chop + * off the actual name part first. + */ + _film->set_name(name.substr(0, name.find("_"))); + } _film->set_name (_film->isdcf_name (true)); _film->set_use_isdcf_name (false); } |
