From 5ac7a87390c0c0019c5e4824868b025079a0479e Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 28 Jun 2010 14:59:38 +0000 Subject: [PATCH] clear region history in Playlist::notify_region_added() so that it has no apparent history before being added to the Playlist. git-svn-id: http://subversion.ardour.org/svn/ardour2/ardour2/branches/3.0@7311 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/playlist.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index fe70766e8..cc9dc62ec 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -552,6 +552,7 @@ Playlist::notify_region_added (boost::shared_ptr r) pending_contents_change = true; pending_length = true; } else { + r->clear_history (); pending_length = false; LengthChanged (); /* EMIT SIGNAL */ pending_contents_change = false; @@ -620,7 +621,10 @@ Playlist::flush_notifications () for (s = pending_adds.begin(); s != pending_adds.end(); ++s) { // cerr << _name << " sends RegionAdded\n"; - RegionAdded (boost::weak_ptr (*s)); /* EMIT SIGNAL */ + /* don't emit RegionAdded signal until relayering is done, + so that the region is fully setup by the time + anyone hear's that its been added + */ dependent_checks_needed.insert (*s); } @@ -647,6 +651,11 @@ Playlist::flush_notifications () // cerr << _name << "done contents change @ " << get_microseconds() << endl; } + for (s = pending_adds.begin(); s != pending_adds.end(); ++s) { + (*s)->clear_history (); + RegionAdded (boost::weak_ptr (*s)); /* EMIT SIGNAL */ + } + for (s = dependent_checks_needed.begin(); s != dependent_checks_needed.end(); ++s) { check_dependents (*s, false); } -- 2.11.4.GIT