Fix failure to save screen notes when making a new one (github bug #6).
authorCarl Hetherington <cth@carlh.net>
Fri, 3 Jan 2020 01:29:24 +0000 (02:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 3 Jan 2020 01:29:48 +0000 (02:29 +0100)
src/lib/screen.h
src/tools/dcpomatic_kdm_cli.cc
src/wx/screens_panel.cc

index eff2e5ffe71c96b4ca390cf634673f83347a786c..cfb45684b1e4a88c3f0d8c4e99265758d1480088 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
     This file is part of DCP-o-matic.
 
@@ -56,8 +56,9 @@ private:
 class Screen
 {
 public:
 class Screen
 {
 public:
-       Screen (std::string const & n, boost::optional<dcp::Certificate> rec, std::vector<TrustedDevice> td)
-               : name (n)
+       Screen (std::string const & na, std::string const & no, boost::optional<dcp::Certificate> rec, std::vector<TrustedDevice> td)
+               : name (na)
+               , notes (no)
                , recipient (rec)
                , trusted_devices (td)
        {}
                , recipient (rec)
                , trusted_devices (td)
        {}
index 21f9ec7340d198ac70dd584106cadbd4ebfc1bce..d0b60366b2cfe78fbd3a3ba88d75cec21596ee28 100644 (file)
@@ -505,7 +505,7 @@ int main (int argc, char* argv[])
                {
                        /* Make a new screen and add it to the current cinema */
                        dcp::CertificateChain chain (dcp::file_to_string(optarg));
                {
                        /* Make a new screen and add it to the current cinema */
                        dcp::CertificateChain chain (dcp::file_to_string(optarg));
-                       shared_ptr<Screen> screen (new Screen (screen_description, chain.leaf(), vector<TrustedDevice>()));
+                       shared_ptr<Screen> screen (new Screen (screen_description, "", chain.leaf(), vector<TrustedDevice>()));
                        if (cinema) {
                                cinema->add_screen (screen);
                        }
                        if (cinema) {
                                cinema->add_screen (screen);
                        }
index e89173eb27dd82f43f209e43ecffb2643187b85b..4b0d50c16d55755a6c32e3648e19536ebcc1311a 100644 (file)
@@ -223,7 +223,7 @@ ScreensPanel::add_screen_clicked ()
                }
        }
 
                }
        }
 
-       shared_ptr<Screen> s (new Screen (d->name(), d->recipient(), d->trusted_devices()));
+       shared_ptr<Screen> s (new Screen (d->name(), d->notes(), d->recipient(), d->trusted_devices()));
        c->add_screen (s);
        optional<wxTreeItemId> id = add_screen (c, s);
        if (id) {
        c->add_screen (s);
        optional<wxTreeItemId> id = add_screen (c, s);
        if (id) {