summaryrefslogtreecommitdiff
path: root/libs/ardour/automation_control.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-06-17 22:19:21 +1000
committernick_m <mainsbridge@gmail.com>2015-06-17 22:19:21 +1000
commit80090f0f71256d65c876f83d3c6f3637cb9d44bb (patch)
tree5462cffb9ed531dd5c5a26919ca99a6a86e090c2 /libs/ardour/automation_control.cc
parent44790ebff017173ff6a593c1278bbe6cbab3fa4b (diff)
Fix thinko in automation write undo.
- also allow saved automation list state to be touch or off if actually in write mode.
Diffstat (limited to 'libs/ardour/automation_control.cc')
-rw-r--r--libs/ardour/automation_control.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc
index f2361c2b30..bfb1046849 100644
--- a/libs/ardour/automation_control.cc
+++ b/libs/ardour/automation_control.cc
@@ -88,6 +88,8 @@ AutomationControl::set_automation_state (AutoState as)
}
if (as == Write) {
+ /* get state for undo */
+ _before = &alist ()->get_state ();
AutomationWatch::instance().add_automation_watch (shared_from_this());
} else if (as == Touch) {
if (!touching()) {
@@ -122,10 +124,6 @@ AutomationControl::start_touch(double when)
if (!touching()) {
- if (alist()->automation_state() == Write) {
- _before = &alist ()->get_state ();
- }
-
if (alist()->automation_state() == Touch) {
/* subtle. aligns the user value with the playback */
set_value (get_value ());