Tweak config comment.
[dcpomatic.git] / src / lib / playlist.cc
index 9e96c693a529679b197ae66e0ba6c67d8a2fc248..89990a42796b34c9b54aa7f9e1844c4fb048424a 100644 (file)
@@ -34,6 +34,7 @@
 #include "compose.hpp"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
+#include <boost/bind/placeholders.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/foreach.hpp>
 #include <iostream>
@@ -52,6 +53,9 @@ using boost::shared_ptr;
 using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
 using namespace dcpomatic;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
 
 Playlist::Playlist ()
        : _sequence (true)
@@ -70,13 +74,6 @@ Playlist::~Playlist ()
 void
 Playlist::content_change (weak_ptr<const Film> weak_film, ChangeType type, weak_ptr<Content> content, int property, bool frequent)
 {
-       /* Make sure we only hear about atomic changes (e.g. a PENDING always with the DONE/CANCELLED)
-          Ignore any DONE/CANCELLED that arrives without a PENDING.
-       */
-       if (_checker.send (type, property)) {
-               return;
-       }
-
        shared_ptr<const Film> film = weak_film.lock ();
        DCPOMATIC_ASSERT (film);
 
@@ -111,8 +108,11 @@ Playlist::content_change (weak_ptr<const Film> weak_film, ChangeType type, weak_
                        }
 
                        if (changed) {
-                               OrderChanged ();
+                               OrderChange ();
                        }
+
+                       /* The length might have changed, and that's good enough for this signal */
+                       LengthChange ();
                }
        }
 
@@ -281,6 +281,8 @@ Playlist::add (shared_ptr<const Film> film, shared_ptr<Content> c)
        }
 
        Change (CHANGE_TYPE_DONE);
+
+       LengthChange ();
 }
 
 void
@@ -312,6 +314,8 @@ Playlist::remove (shared_ptr<Content> c)
        }
 
        /* This won't change order, so it does not need a sort */
+
+       LengthChange ();
 }
 
 void
@@ -334,9 +338,11 @@ Playlist::remove (ContentList c)
                }
        }
 
+       Change (CHANGE_TYPE_DONE);
+
        /* This won't change order, so it does not need a sort */
 
-       Change (CHANGE_TYPE_DONE);
+       LengthChange ();
 }
 
 class FrameRateCandidate