summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-11-06 09:50:43 +0000
committerCarl Hetherington <cth@carlh.net>2014-11-06 09:50:43 +0000
commitb17b68bb8e564601c7ea80ceea853fa564998c39 (patch)
treeb57f5f38acff78e0ca96ceaa14e54e63212f8736
parent19ae5744be713673e42b5c6f43c1d9613c715509 (diff)
Forward-port ISDCF naming tweak from 1.x.
-rw-r--r--src/wx/dcp_panel.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index f042e5eb1..d05171e41 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -270,7 +270,17 @@ DCPPanel::film_changed (int p)
checked_set (_use_isdcf_name, _film->use_isdcf_name ());
setup_dcp_name ();
bool const i = _film->use_isdcf_name ();
- if (!i) {
+ if (i) {
+ /* We just chose to use the ISDCF name. The user has probably unticked and re-ticked the box,
+ so it's fairly likey that the film's name will now be a full ISDCF one. Based on this guess,
+ remove anything after the first _ in the film's name here.
+ */
+ string const n = _film->name ();
+ if (n.find ("_") != string::npos) {
+ _film->set_name (n.substr (0, n.find ("_")));
+ }
+ } else {
+ /* Otherwise set the name to the full ISDCF name */
_film->set_name (_film->isdcf_name (true));
}
_edit_isdcf_button->Enable (i);