summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_control.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-10-12 17:26:46 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-10-12 17:26:46 -0400
commitc104c9d4726f3ba1ecd352d13b88a57f2f964510 (patch)
tree61c1214d49f6efded889213e612d49fed5612927 /libs/ardour/automation_control.cc
parent27cff39dc7c8692e309ac0f9c515a583b775fd7d (diff)
change return type of AutomationControl::actually_set_value() from void to bool, to indicate if value was changed.
Don't call Session::set_dirty() when no change occurs
Diffstat (limited to 'libs/ardour/automation_control.cc')
-rw-r--r--libs/ardour/automation_control.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc
index 9a6590ebe8..03871cf07c 100644
--- a/libs/ardour/automation_control.cc
+++ b/libs/ardour/automation_control.cc
@@ -116,11 +116,11 @@ AutomationControl::set_value (double val, PBD::Controllable::GroupControlDisposi
* (e.g. record if necessary, etc.)
* @param value `user' value
*/
-void
+bool
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 ();
+ const double old_value = get_value ();
Control::set_double (value, _session.transport_frame(), to_list);
@@ -128,7 +128,12 @@ AutomationControl::actually_set_value (double value, PBD::Controllable::GroupCon
//std::cerr << "++++ Changed (" << enum_2_string (at) << ", " << enum_2_string (gcd) << ") = " << value
//<< " (was " << old_value << ") @ " << this << std::endl;
- Changed (true, gcd);
+ if (old_value != value) {
+ Changed (true, gcd);
+ return true;
+ }
+
+ return false;
}
void