summaryrefslogtreecommitdiff
path: root/libs/ardour/slavable_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/slavable_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/slavable_automation_control.cc')
-rw-r--r--libs/ardour/slavable_automation_control.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc
index a80598439d..2f67946705 100644
--- a/libs/ardour/slavable_automation_control.cc
+++ b/libs/ardour/slavable_automation_control.cc
@@ -96,7 +96,7 @@ SlavableAutomationControl::get_value() const
}
}
-void
+bool
SlavableAutomationControl::actually_set_value (double val, Controllable::GroupControlDisposition group_override)
{
val = std::max (std::min (val, (double)_desc.upper), (double)_desc.lower);
@@ -112,9 +112,12 @@ SlavableAutomationControl::actually_set_value (double val, Controllable::GroupCo
/* this sets the Evoral::Control::_user_value for us, which will
be retrieved by AutomationControl::get_value ()
*/
- AutomationControl::actually_set_value (val, group_override);
+ if (AutomationControl::actually_set_value (val, group_override)) {
+ _session.set_dirty ();
+ return true;
+ }
- _session.set_dirty ();
+ return false;
}
void