Only emit Changed when things are added to or removed from the playlist.
authorCarl Hetherington <cth@carlh.net>
Tue, 24 Jun 2014 10:12:11 +0000 (11:12 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 24 Jun 2014 10:12:11 +0000 (11:12 +0100)
src/lib/playlist.cc
src/lib/playlist.h

index dc87fbfabb31702a2c18f4c4bd5469f15e6b71e7..e847e623baf00d9f73150cc005c6e074dca4f4e6 100644 (file)
@@ -367,8 +367,6 @@ Playlist::move_earlier (shared_ptr<Content> c)
        (*previous)->set_position (p + c->length_after_trim ());
        c->set_position (p);
        sort (_content.begin(), _content.end(), ContentSorter ());
-       
-       Changed ();
 }
 
 void
@@ -394,8 +392,6 @@ Playlist::move_later (shared_ptr<Content> c)
        (*next)->set_position (c->position ());
        c->set_position (p + c->length_after_trim ());
        sort (_content.begin(), _content.end(), ContentSorter ());
-       
-       Changed ();
 }
 
 FrameRateChange
index effc521012dfbc70779f5bfd9f4befe2a79d4616..12380696bdf49349debb1c334915c58493a9b187 100644 (file)
@@ -82,8 +82,12 @@ public:
 
        void repeat (ContentList, int);
 
+       /** Emitted when content has been added to or removed from the playlist */
        mutable boost::signals2::signal<void ()> Changed;
-       /** Third parameter is true if signals are currently being emitted frequently */
+       /** Emitted when something about a piece of our content has changed;
+        *  these emissions include when the position of the content changes.
+        *  Third parameter is true if signals are currently being emitted frequently.
+        */
        mutable boost::signals2::signal<void (boost::weak_ptr<Content>, int, bool)> ContentChanged;
        
 private: