clear region history in Playlist::notify_region_added() so that it has no apparent...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 28 Jun 2010 14:59:38 +0000 (14:59 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 28 Jun 2010 14:59:38 +0000 (14:59 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7311 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/playlist.cc

index fe70766e82de59f35028122a6b4b4fe4018a8052..cc9dc62ec79c027fcc3f8417c11ab7821bb5d190 100644 (file)
@@ -552,6 +552,7 @@ Playlist::notify_region_added (boost::shared_ptr<Region> 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<Region> (*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<Region> (*s)); /* EMIT SIGNAL */
+        }
+
        for (s = dependent_checks_needed.begin(); s != dependent_checks_needed.end(); ++s) {
                check_dependents (*s, false);
        }