Clean up access to stuff from Film.
[dcpomatic.git] / src / lib / playlist.cc
index 9e96c693a529679b197ae66e0ba6c67d8a2fc248..73a3214d30314818016590e0b9aac4dca298fd81 100644 (file)
@@ -113,6 +113,9 @@ Playlist::content_change (weak_ptr<const Film> weak_film, ChangeType type, weak_
                        if (changed) {
                                OrderChanged ();
                        }
+
+                       /* The length might have changed, and that's good enough for this signal */
+                       LengthChange ();
                }
        }
 
@@ -281,6 +284,8 @@ Playlist::add (shared_ptr<const Film> film, shared_ptr<Content> c)
        }
 
        Change (CHANGE_TYPE_DONE);
+
+       LengthChange ();
 }
 
 void
@@ -312,6 +317,8 @@ Playlist::remove (shared_ptr<Content> c)
        }
 
        /* This won't change order, so it does not need a sort */
+
+       LengthChange ();
 }
 
 void
@@ -334,9 +341,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