Disable '2D version of 3D content' ISDCF metadata checkbox with 3D content (part...
authorCarl Hetherington <cth@carlh.net>
Tue, 4 Aug 2015 20:25:25 +0000 (21:25 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 4 Aug 2015 20:25:25 +0000 (21:25 +0100)
ChangeLog
src/lib/film.cc
src/wx/config_dialog.cc
src/wx/dcp_panel.cc
src/wx/isdcf_metadata_dialog.cc
src/wx/isdcf_metadata_dialog.h

index 6c01b76ddccb8510cc2c722019bbc0ed3e8f7963..581e0d21197f6403e27843b84104f83871e76e99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-04  Carl Hetherington  <cth@carlh.net>
+
+       * Disable "2D version of 3D content" ISDCF metadata
+       checkbutton with 3D content (part of #652).
+
 2015-07-30  c.hetherington  <cth@carlh.net>
 
        * Allow recreation of the certificate chain and key
index 4de7a12a51734a774e0d0c38da257d69e10d3290..405d8cc9bcbb09cf9a89f1774582fd7a010c2a74 100644 (file)
@@ -781,6 +781,11 @@ Film::set_three_d (bool t)
 {
        _three_d = t;
        signal_changed (THREE_D);
+
+       if (_three_d && _isdcf_metadata.two_d_version_of_three_d) {
+               _isdcf_metadata.two_d_version_of_three_d = false;
+               signal_changed (ISDCF_METADATA);
+       }
 }
 
 void
index 652f8dacb79e6dabb235e63bf3784e4b43a98a6d..aabaa0fba45d742b42afd08c2583caf5d1835925 100644 (file)
@@ -455,7 +455,7 @@ private:
 
        void edit_isdcf_metadata_clicked ()
        {
-               ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, Config::instance()->default_isdcf_metadata ());
+               ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, Config::instance()->default_isdcf_metadata (), false);
                d->ShowModal ();
                Config::instance()->set_default_isdcf_metadata (d->isdcf_metadata ());
                d->Destroy ();
index b38476dd7a0a8a4d44cb92045903f9a249cc2e91..31c019c934e405c2dc9513c81432ad3f68338820 100644 (file)
@@ -501,7 +501,7 @@ DCPPanel::edit_isdcf_button_clicked ()
                return;
        }
 
-       ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, _film->isdcf_metadata ());
+       ISDCFMetadataDialog* d = new ISDCFMetadataDialog (_panel, _film->isdcf_metadata (), _film->three_d ());
        d->ShowModal ();
        _film->set_isdcf_metadata (d->isdcf_metadata ());
        d->Destroy ();
index 47d159cb984a8a01a879bdeb0bdefe35b9f3d74a..65f3b53fff6f0517af4b6dc6ccd75ef202196256 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
+#include "isdcf_metadata_dialog.h"
+#include "wx_util.h"
+#include "lib/film.h"
 #include <wx/wx.h>
 #include <wx/sizer.h>
 #include <wx/spinctrl.h>
-#include "lib/film.h"
-#include "isdcf_metadata_dialog.h"
-#include "wx_util.h"
 
 using boost::shared_ptr;
 
-ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm)
+/** @param threed true if the film is in 3D */
+ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm, bool threed)
        : TableDialog (parent, _("ISDCF name"), 2, true)
 {
        add (_("Content version"), true);
@@ -68,6 +69,10 @@ ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm)
        _two_d_version_of_three_d = add (new wxCheckBox (this, wxID_ANY, _("2D version of content available in 3D")));
        add_spacer ();
 
+       if (threed) {
+               _two_d_version_of_three_d->Enable (false);
+       }
+
        add (_("Mastered luminance (e.g. 14fl)"), true);
        _mastered_luminance = add (new wxTextCtrl (this, wxID_ANY));
 
index 516f832317912fe9ebaae5c39e02a747feaf2dec..db34a7fcab1953d1387274fa4eb55edb8f7aa35a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
 */
 
+#include "table_dialog.h"
+#include "lib/isdcf_metadata.h"
 #include <wx/textctrl.h>
 #include <boost/shared_ptr.hpp>
-#include "lib/isdcf_metadata.h"
-#include "table_dialog.h"
 
 class wxSpinCtrl;
 class Film;
@@ -28,7 +28,7 @@ class Film;
 class ISDCFMetadataDialog : public TableDialog
 {
 public:
-       ISDCFMetadataDialog (wxWindow *, ISDCFMetadata);
+       ISDCFMetadataDialog (wxWindow *, ISDCFMetadata, bool threed);
 
        ISDCFMetadata isdcf_metadata () const;