much simpler implementation of fix originally in c104c9d4726f3: don't call Session::set_dirty() or emit Changed() unless AutomationControl actually changes value
This commit is contained in:
parent
92f1eb6be9
commit
9066dd731b
|
@ -120,15 +120,28 @@ void
|
|||
AutomationControl::actually_set_value (double value, PBD::Controllable::GroupControlDisposition gcd)
|
||||
{
|
||||
bool to_list = _list && boost::dynamic_pointer_cast<AutomationList>(_list)->automation_write();
|
||||
//const double old_value = Control::user_double ();
|
||||
/* We cannot use ::get_value() here since that is virtual,
|
||||
and its return value will/may depend on the ordering
|
||||
of a derived class' own implementation of ::actually_set_value().
|
||||
|
||||
The derived classes generally need to set their own internal state
|
||||
before calling this version, which means that ::get_value()
|
||||
would generally return the *NEW* state, and thus lead to
|
||||
Changed() not being emitted below.
|
||||
*/
|
||||
|
||||
const double old_value = Control::user_double ();
|
||||
|
||||
Control::set_double (value, _session.transport_frame(), to_list);
|
||||
|
||||
//AutomationType at = (AutomationType) _parameter.type();
|
||||
//std::cerr << "++++ Changed (" << enum_2_string (at) << ", " << enum_2_string (gcd) << ") = " << value
|
||||
//<< " (was " << old_value << ") @ " << this << std::endl;
|
||||
if (old_value != value) {
|
||||
AutomationType at = (AutomationType) _parameter.type();
|
||||
std::cerr << "++++ Changed (" << enum_2_string (at) << ", " << enum_2_string (gcd) << ") = " << value
|
||||
<< " (was " << old_value << ") @ " << this << std::endl;
|
||||
|
||||
Changed (true, gcd);
|
||||
Changed (true, gcd);
|
||||
_session.set_dirty ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -49,7 +49,6 @@ PhaseControl::set_phase_invert (uint32_t c, bool yn)
|
|||
if (_phase_invert[c] != yn) {
|
||||
_phase_invert[c] = yn;
|
||||
AutomationControl::actually_set_value (_phase_invert.to_ulong(), Controllable::NoGroup);
|
||||
_session.set_dirty ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,8 +58,6 @@ PhaseControl::set_phase_invert (boost::dynamic_bitset<> p)
|
|||
if (_phase_invert != p) {
|
||||
_phase_invert = p;
|
||||
AutomationControl::actually_set_value (_phase_invert.to_ulong(), Controllable::NoGroup);
|
||||
Changed (true, Controllable::NoGroup); /* EMIT SIGNAL */
|
||||
_session.set_dirty ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -113,8 +113,6 @@ SlavableAutomationControl::actually_set_value (double val, Controllable::GroupCo
|
|||
be retrieved by AutomationControl::get_value ()
|
||||
*/
|
||||
AutomationControl::actually_set_value (val, group_override);
|
||||
|
||||
_session.set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -102,7 +102,6 @@ SoloIsolateControl::actually_set_value (double val, PBD::Controllable::GroupCont
|
|||
*/
|
||||
|
||||
AutomationControl::actually_set_value (val, gcd);
|
||||
_session.set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -46,7 +46,6 @@ SoloSafeControl::actually_set_value (double val, PBD::Controllable::GroupControl
|
|||
*/
|
||||
|
||||
AutomationControl::actually_set_value (val, gcd);
|
||||
_session.set_dirty ();
|
||||
}
|
||||
|
||||
double
|
||||
|
|
Loading…
Reference in New Issue
Block a user