summaryrefslogtreecommitdiff
path: root/libs/ardour/playlist.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-20 02:03:44 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-20 02:03:44 +0000
commit7dffe671da3489206f06d57c96595d5eaabb9ec4 (patch)
tree065145156d506b7542b327750fa7210f44e97fdb /libs/ardour/playlist.cc
parent3c8786f45b2e1566e9ac76f06c69c04b26f0f227 (diff)
Now that notify_length_changed() just calls
ContentsChanged, its callers can be removed or changed to just notify_contents_changed. git-svn-id: svn://localhost/ardour2/branches/3.0@11024 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r--libs/ardour/playlist.cc49
1 files changed, 4 insertions, 45 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index d234ab58c3..641aeff012 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -563,15 +563,6 @@ Playlist::notify_region_added (boost::shared_ptr<Region> r)
}
}
-void
-Playlist::notify_length_changed ()
-{
- if (!holding_state ()) {
- pending_contents_change = false;
- ContentsChanged (); /* EMIT SIGNAL */
- }
-}
-
/** @param from_undo true if this flush is triggered by the end of an undo on this playlist */
void
Playlist::flush_notifications (bool from_undo)
@@ -737,18 +728,12 @@ Playlist::flush_notifications (bool from_undo)
bool
Playlist::add_region_internal (boost::shared_ptr<Region> region, framepos_t position)
{
- if (region->data_type() != _type){
+ if (region->data_type() != _type) {
return false;
}
RegionSortByPosition cmp;
- framecnt_t old_length = 0;
-
- if (!holding_state()) {
- old_length = _get_extent().second;
- }
-
if (!first_set_state) {
boost::shared_ptr<Playlist> foo (shared_from_this());
region->set_playlist (boost::weak_ptr<Playlist>(foo));
@@ -772,14 +757,8 @@ Playlist::flush_notifications (bool from_undo)
notify_region_added (region);
-
if (!holding_state ()) {
-
check_dependents (region, false);
-
- if (old_length != _get_extent().second) {
- notify_length_changed ();
- }
}
region->PropertyChanged.connect_same_thread (region_state_changed_connections, boost::bind (&Playlist::region_changed_proxy, this, _1, boost::weak_ptr<Region> (region)));
@@ -814,11 +793,6 @@ Playlist::flush_notifications (bool from_undo)
Playlist::remove_region_internal (boost::shared_ptr<Region> region)
{
RegionList::iterator i;
- framecnt_t old_length = 0;
-
- if (!holding_state()) {
- old_length = _get_extent().second;
- }
if (!in_set_state) {
/* unset playlist */
@@ -840,10 +814,6 @@ Playlist::flush_notifications (bool from_undo)
if (!holding_state ()) {
relayer ();
remove_dependents (region);
-
- if (old_length != _get_extent().second) {
- notify_length_changed ();
- }
}
notify_region_removed (region);
@@ -1222,8 +1192,6 @@ Playlist::flush_notifications (bool from_undo)
RegionLock rl1 (this);
RegionLock rl2 (other.get());
- framecnt_t const old_length = _get_extent().second;
-
int itimes = (int) floor (times);
framepos_t pos = position;
framecnt_t const shift = other->_get_extent().second;
@@ -1242,15 +1210,6 @@ Playlist::flush_notifications (bool from_undo)
}
pos += shift;
}
-
-
- /* XXX shall we handle fractional cases at some point? */
-
- if (old_length != _get_extent().second) {
- notify_length_changed ();
- }
-
-
}
return 0;
@@ -1496,7 +1455,7 @@ Playlist::flush_notifications (bool from_undo)
_splicing = false;
- notify_length_changed ();
+ notify_contents_changed ();
}
void
@@ -1552,7 +1511,7 @@ Playlist::flush_notifications (bool from_undo)
timestamp_layer_op (region);
}
- notify_length_changed ();
+ notify_contents_changed ();
relayer ();
check_dependents (region, false);
}
@@ -2713,7 +2672,7 @@ Playlist::nudge_after (framepos_t start, framecnt_t distance, bool forwards)
if (moved) {
_nudging = false;
- notify_length_changed ();
+ notify_contents_changed ();
}
}