diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index fe70766e82..cc9dc62ec7 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); }