13
0

Fix non-layered record-undo

Previously an empty RegionList was used (auto-partition
changes were never collected at rec-stop), furthermore
auto-partitioned regions do not have an old ARDOUR::AutomationList
(fade in/out) property (_have_old is false).
This commit is contained in:
Robin Gareus 2021-04-12 23:07:43 +02:00
parent 5d12aa15f5
commit 8f5c3fcddb
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 5 additions and 6 deletions

View File

@ -699,10 +699,8 @@ Playlist::add_region (boost::shared_ptr<Region> region, samplepos_t position, fl
samplepos_t pos = position;
if (times == 1 && auto_partition) {
RegionList thawlist;
partition_internal (pos - 1, (pos + region->length ()), true, rlock.thawlist);
for (RegionList::iterator i = thawlist.begin (); i != thawlist.end (); ++i) {
(*i)->resume_property_changes ();
for (RegionList::iterator i = rlock.thawlist.begin (); i != rlock.thawlist.end (); ++i) {
_session.add_command (new StatefulDiffCommand (*i));
}
}

View File

@ -405,9 +405,10 @@ public:
}
bool changed () const {
/* Expensive, but, hey; this requires operator!= in
our T
*/
if (!_old) {
return false;
}
/* Expensive, but, hey; this requires operator!= in our T */
return (*_old != *_current);
}