diff options
author | Robin Gareus <robin@gareus.org> | 2017-03-12 02:37:30 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-03-12 02:37:30 +0100 |
commit | 52b203ad36d07e50c704babb8b7f2e506b67137c (patch) | |
tree | 134f882caed8fef69d8035e4c70555d18dda1ebd /libs/ardour | |
parent | 37bcbcad414774a4a390f15e8c1f6ffbf17699a3 (diff) |
Fix issue with automation-playback constantly marking a session dirty.
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/automation_control.h | 1 | ||||
-rw-r--r-- | libs/ardour/automation_control.cc | 8 | ||||
-rw-r--r-- | libs/ardour/plugin.cc | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index 21c7832996..299b7d1d97 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -152,6 +152,7 @@ class LIBARDOUR_API AutomationControl */ friend class ControlGroup; void set_group (boost::shared_ptr<ControlGroup>); + PBD::ScopedConnection _state_changed_connection; }; diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index 0a29e7e662..84c606cfd8 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -60,6 +60,10 @@ AutomationControl::AutomationControl(ARDOUR::Session& s if (_desc.toggled) { set_flags (Controllable::Toggle); } + boost::shared_ptr<AutomationList> al = alist(); + if (al) { + al->StateChanged.connect_same_thread (_state_changed_connection, boost::bind (&Session::set_dirty, &_session)); + } } AutomationControl::~AutomationControl () @@ -174,7 +178,9 @@ AutomationControl::actually_set_value (double value, PBD::Controllable::GroupCon //<< " (was " << old_value << ") @ " << this << std::endl; Changed (true, gcd); - _session.set_dirty (); + if (!al || !al->automation_playback ()) { + _session.set_dirty (); + } } } diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 35495488dd..8051e95804 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -450,7 +450,6 @@ void Plugin::set_parameter (uint32_t /* which */, float /* value */) { _parameter_changed_since_last_preset = true; - _session.set_dirty (); PresetDirty (); /* EMIT SIGNAL */ } |