projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4b1c869
)
Trim after _ in current name when enabling 'Use ISDCF name' (#1513).
author
Carl Hetherington
<cth@carlh.net>
Thu, 25 Jul 2019 15:31:58 +0000
(16:31 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 25 Jul 2019 15:31:58 +0000
(16:31 +0100)
src/wx/dcp_panel.cc
patch
|
blob
|
history
diff --git
a/src/wx/dcp_panel.cc
b/src/wx/dcp_panel.cc
index b938ed87dd83322b096bd47a809641bf10bc41ff..a7f4f45e9f88b6e68055aecfa3c55fbcc9dc443a 100644
(file)
--- 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 ());
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;
setup_dcp_name ();
_edit_isdcf_button->Enable (_film->use_isdcf_name ());
break;