summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-07-25 16:31:58 +0100
committerCarl Hetherington <cth@carlh.net>2019-07-25 16:31:58 +0100
commit7a01980e54074dcfe3d8c55c396eabd6f0d48497 (patch)
tree8ec4c187cd2548c86e4fbe8fab870e89dc5cd6e9 /src
parent4b1c869f2139bcc0ad2163646d04e0d787cf8a32 (diff)
Trim after _ in current name when enabling 'Use ISDCF name' (#1513).
Diffstat (limited to 'src')
-rw-r--r--src/wx/dcp_panel.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index b938ed87d..a7f4f45e9 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -455,6 +455,16 @@ DCPPanel::film_changed (int p)
case Film::USE_ISDCF_NAME:
{
checked_set (_use_isdcf_name, _film->use_isdcf_name ());
+ if (_film->use_isdcf_name()) {
+ /* We are going back to using an ISDCF name. Remove anything after a _ in the current name,
+ in case the user has clicked 'Copy as name' then re-ticked 'Use ISDCF name' (#1513).
+ */
+ string const name = _film->name ();
+ string::size_type const u = name.find("_");
+ if (u != string::npos) {
+ _film->set_name (name.substr(0, u));
+ }
+ }
setup_dcp_name ();
_edit_isdcf_button->Enable (_film->use_isdcf_name ());
break;