Fix issue with automation-playback constantly marking a session dirty.

This commit is contained in:
Robin Gareus
2017-03-12 02:37:30 +01:00
parent 37bcbcad41
commit 52b203ad36
3 changed files with 8 additions and 2 deletions

View File

@@ -152,6 +152,7 @@ class LIBARDOUR_API AutomationControl
*/
friend class ControlGroup;
void set_group (boost::shared_ptr<ControlGroup>);
PBD::ScopedConnection _state_changed_connection;
};

View File

@@ -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 ();
}
}
}

View File

@@ -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 */
}