Merge master.
[dcpomatic.git] / src / lib / playlist.cc
index e555db9ba7387d55fccf963fb5015663233a5fdc..16c740943ca89f382f27082ba70a935d987c484b 100644 (file)
@@ -186,24 +186,6 @@ Playlist::remove (ContentList c)
        Changed ();
 }
 
-bool
-Playlist::has_subtitles () const
-{
-       for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) {
-               shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (*i);
-               if (fc && !fc->subtitle_streams().empty()) {
-                       return true;
-               }
-
-               shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (*i);
-               if (sc) {
-                       return true;
-               }
-       }
-
-       return false;
-}
-
 class FrameRateCandidate
 {
 public:
@@ -384,13 +366,12 @@ Playlist::move_earlier (shared_ptr<Content> c)
        if (previous == _content.end ()) {
                return;
        }
+
        
        DCPTime const p = (*previous)->position ();
        (*previous)->set_position (p + c->length_after_trim ());
        c->set_position (p);
        sort (_content.begin(), _content.end(), ContentSorter ());
-       
-       Changed ();
 }
 
 void
@@ -412,10 +393,7 @@ Playlist::move_later (shared_ptr<Content> c)
                return;
        }
 
-       DCPTime const p = (*next)->position ();
        (*next)->set_position (c->position ());
-       c->set_position (p + c->length_after_trim ());
+       c->set_position (c->position() + c->length_after_trim ());
        sort (_content.begin(), _content.end(), ContentSorter ());
-       
-       Changed ();
 }