From: Carl Hetherington Date: Wed, 16 Jul 2014 09:30:57 +0000 (+0100) Subject: Limit KDM types depending on DCP standard. X-Git-Tag: v2.0.48~655^2~37 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=93dfc974a8af617d37e23cf0a5b81672da54308f;p=dcpomatic.git Limit KDM types depending on DCP standard. --- diff --git a/ChangeLog b/ChangeLog index b7daf3e0c..d9295894a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-07-16 Carl Hetherington + * Limit allowed KDM types based on Interop/SMPTE setting + of DCP (#385). + * Updates to fr_FR from Grégoire Ausina. 2014-07-14 Carl Hetherington diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc index 8df94de9c..a7af7978c 100644 --- a/src/wx/kdm_dialog.cc +++ b/src/wx/kdm_dialog.cc @@ -161,9 +161,11 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr film) add_label_to_sizer (table, this, _("KDM type"), true); _type = new wxChoice (this, wxID_ANY); - _type->Append ("Modified Transitional 1"); - _type->Append ("DCI Any"); - _type->Append ("DCI Specific"); + _type->Append ("Modified Transitional 1", ((void *) libdcp::KDM::MODIFIED_TRANSITIONAL_1)); + if (!film->interop ()) { + _type->Append ("DCI Any", ((void *) libdcp::KDM::DCI_ANY)); + _type->Append ("DCI Specific", ((void *) libdcp::KDM::DCI_SPECIFIC)); + } table->Add (_type, 1, wxEXPAND); _type->SetSelection (0); @@ -491,16 +493,7 @@ KDMDialog::write_to () const libdcp::KDM::Formulation KDMDialog::formulation () const { - switch (_type->GetSelection()) { - case 0: - return libdcp::KDM::MODIFIED_TRANSITIONAL_1; - case 1: - return libdcp::KDM::DCI_ANY; - case 2: - return libdcp::KDM::DCI_SPECIFIC; - default: - assert (false); - } + return (libdcp::KDM::Formulation) reinterpret_cast (_type->GetClientData (_type->GetSelection())); } void