summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-20 02:03:38 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-20 02:03:38 +0000
commit3c8786f45b2e1566e9ac76f06c69c04b26f0f227 (patch)
treedaadf889fd260ba1de65e933c4bae506206175b0
parente9b4f14668a54e32e83005f0b09889372d1abe11 (diff)
Remove LengthChanged that no-one was listening to.
git-svn-id: svn://localhost/ardour2/branches/3.0@11023 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/ardour/playlist.h2
-rw-r--r--libs/ardour/playlist.cc35
2 files changed, 1 insertions, 36 deletions
diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h
index cce602437b..6d7113b32b 100644
--- a/libs/ardour/ardour/playlist.h
+++ b/libs/ardour/ardour/playlist.h
@@ -180,7 +180,6 @@ public:
PBD::Signal1<void,boost::weak_ptr<Region> > RegionAdded;
PBD::Signal1<void,boost::weak_ptr<Region> > RegionRemoved;
PBD::Signal0<void> NameChanged;
- PBD::Signal0<void> LengthChanged;
PBD::Signal0<void> LayeringChanged;
/** Emitted when regions have moved (not when regions have only been trimmed) */
@@ -265,7 +264,6 @@ public:
RegionList pending_bounds;
bool pending_contents_change;
bool pending_layering;
- bool pending_length;
/** Movements of time ranges caused by region moves; note that
* region trims are not included in this list; it is used to
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index e68c13b173..d234ab58c3 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -304,7 +304,6 @@ Playlist::init (bool hide)
g_atomic_int_set (&block_notifications, 0);
g_atomic_int_set (&ignore_state_changes, 0);
pending_contents_change = false;
- pending_length = false;
pending_layering = false;
first_set_state = true;
_refcnt = 0;
@@ -473,13 +472,10 @@ Playlist::notify_region_removed (boost::shared_ptr<Region> r)
if (holding_state ()) {
pending_removes.insert (r);
pending_contents_change = true;
- pending_length = true;
} else {
/* this might not be true, but we have to act
as though it could be.
*/
- pending_length = false;
- LengthChanged (); /* EMIT SIGNAL */
pending_contents_change = false;
RegionRemoved (boost::weak_ptr<Region> (r)); /* EMIT SIGNAL */
ContentsChanged (); /* EMIT SIGNAL */
@@ -559,11 +555,8 @@ Playlist::notify_region_added (boost::shared_ptr<Region> r)
if (holding_state()) {
pending_adds.insert (r);
pending_contents_change = true;
- pending_length = true;
} else {
r->clear_changes ();
- pending_length = false;
- LengthChanged (); /* EMIT SIGNAL */
pending_contents_change = false;
RegionAdded (boost::weak_ptr<Region> (r)); /* EMIT SIGNAL */
ContentsChanged (); /* EMIT SIGNAL */
@@ -573,11 +566,7 @@ Playlist::notify_region_added (boost::shared_ptr<Region> r)
void
Playlist::notify_length_changed ()
{
- if (holding_state ()) {
- pending_length = true;
- } else {
- pending_length = false;
- LengthChanged(); /* EMIT SIGNAL */
+ if (!holding_state ()) {
pending_contents_change = false;
ContentsChanged (); /* EMIT SIGNAL */
}
@@ -590,8 +579,6 @@ Playlist::flush_notifications (bool from_undo)
set<boost::shared_ptr<Region> > dependent_checks_needed;
set<boost::shared_ptr<Region> >::iterator s;
uint32_t regions_changed = false;
- bool check_length = false;
- framecnt_t old_length = 0;
if (in_flush) {
return;
@@ -601,10 +588,6 @@ Playlist::flush_notifications (bool from_undo)
if (!pending_bounds.empty() || !pending_removes.empty() || !pending_adds.empty()) {
regions_changed = true;
- if (!pending_length) {
- old_length = _get_extent ().second;
- check_length = true;
- }
}
/* we have no idea what order the regions ended up in pending
@@ -638,19 +621,6 @@ Playlist::flush_notifications (bool from_undo)
dependent_checks_needed.insert (*s);
}
- if (check_length) {
- if (old_length != _get_extent().second) {
- pending_length = true;
- // cerr << _name << " length has changed\n";
- }
- }
-
- if (pending_length || (freeze_length != _get_extent().second)) {
- pending_length = false;
- // cerr << _name << " sends LengthChanged\n";
- LengthChanged(); /* EMIT SIGNAL */
- }
-
if (regions_changed || pending_contents_change) {
if (!in_set_state) {
relayer ();
@@ -692,7 +662,6 @@ Playlist::flush_notifications (bool from_undo)
pending_range_moves.clear ();
pending_region_extensions.clear ();
pending_contents_change = false;
- pending_length = false;
}
/*************************************************************
@@ -1701,8 +1670,6 @@ Playlist::flush_notifications (bool from_undo)
}
pending_removes.clear ();
- pending_length = false;
- LengthChanged ();
pending_contents_change = false;
ContentsChanged ();
}