More fixes for errors / crashes / misbehaviour with content changes
[dcpomatic.git] / src / lib / playlist.cc
index c830e5e1e49c3b8e83a3de969f47551853bec826..1bb0ad0d6cda449354ed0eae1da435d59e649131 100644 (file)
@@ -64,6 +64,18 @@ Playlist::~Playlist ()
        reconnect ();
 }
 
+void
+Playlist::content_may_change ()
+{
+       ContentMayChange ();
+}
+
+void
+Playlist::content_not_changed ()
+{
+       ContentNotChanged ();
+}
+
 void
 Playlist::content_changed (weak_ptr<Content> content, int property, bool frequent)
 {
@@ -350,7 +362,9 @@ Playlist::reconnect ()
        _content_connections.clear ();
 
        BOOST_FOREACH (shared_ptr<Content> i, _content) {
-               _content_connections.push_back (i->Changed.connect (bind (&Playlist::content_changed, this, _1, _2, _3)));
+               _content_connections.push_back (i->MayChange.connect(boost::bind(&Playlist::content_may_change, this)));
+               _content_connections.push_back (i->Changed.connect(boost::bind(&Playlist::content_changed, this, _1, _2, _3)));
+               _content_connections.push_back (i->NotChanged.connect(boost::bind(&Playlist::content_not_changed, this)));
        }
 }