From 05bafe7346705a8a3f6bbae17956c54ef3295bcc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 24 Jun 2014 11:12:11 +0100 Subject: Only emit Changed when things are added to or removed from the playlist. --- src/lib/playlist.cc | 4 ---- src/lib/playlist.h | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index dc87fbfab..e847e623b 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -367,8 +367,6 @@ Playlist::move_earlier (shared_ptr 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 c) (*next)->set_position (c->position ()); c->set_position (p + c->length_after_trim ()); sort (_content.begin(), _content.end(), ContentSorter ()); - - Changed (); } FrameRateChange diff --git a/src/lib/playlist.h b/src/lib/playlist.h index effc52101..12380696b 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -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 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, int, bool)> ContentChanged; private: -- cgit v1.2.3