From 58557e88c96ffb97185d746a7a0bdff438f5f567 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 29 Apr 2021 23:25:50 +0200 Subject: [PATCH] Do not move automation when inserting regions RegionInsertDrag or Consolidate Range or any other operation calling Playlist::add_region() previously triggered RangesMoved() which resulted in DiskReader::move_processor_automation() NB. insert + ripple still moves automation correctly. --- libs/ardour/playlist.cc | 6 ++++++ libs/pbd/stateful.cc | 1 + 2 files changed, 7 insertions(+) diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index a9a1d18adf..46fb124a98 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -800,6 +800,12 @@ Playlist::add_region_internal (boost::shared_ptr region, samplepos_t pos region->PropertyChanged.connect_same_thread (region_state_changed_connections, boost::bind (&Playlist::region_changed_proxy, this, _1, boost::weak_ptr (region))); region->DropReferences.connect_same_thread (region_drop_references_connections, boost::bind (&Playlist::region_going_away, this, boost::weak_ptr (region))); + /* do not handle property changes of newly added regions. + * Otherwise this would triggger Playlist::notify_region_moved() + * -> RangesMoved() and move automation. + */ + region->clear_changes (); + return true; } diff --git a/libs/pbd/stateful.cc b/libs/pbd/stateful.cc index 4b4cd1b1cd..5df44693ee 100644 --- a/libs/pbd/stateful.cc +++ b/libs/pbd/stateful.cc @@ -192,6 +192,7 @@ Stateful::clear_changes () for (OwnedPropertyList::iterator i = _properties->begin(); i != _properties->end(); ++i) { i->second->clear_changes (); } + _pending_changed.clear (); } PropertyList *