13
0

do not needlessly keep starting touch/automation watch passes just because a command to start or stop touch was received

This commit is contained in:
Paul Davis 2014-02-19 12:53:19 -05:00
parent a70f914c51
commit 3e1107c157

View File

@ -117,15 +117,23 @@ AutomationControl::set_automation_style (AutoStyle as)
void void
AutomationControl::start_touch(double when) AutomationControl::start_touch(double when)
{ {
set_touching (true); if (!touching()) {
alist()->start_touch(when); if (alist()->automation_state() == Touch) {
AutomationWatch::instance().add_automation_watch (shared_from_this()); alist()->start_touch (when);
AutomationWatch::instance().add_automation_watch (shared_from_this());
}
set_touching (true);
}
} }
void void
AutomationControl::stop_touch(bool mark, double when) AutomationControl::stop_touch(bool mark, double when)
{ {
set_touching (false); if (touching()) {
alist()->stop_touch (mark, when); set_touching (false);
AutomationWatch::instance().remove_automation_watch (shared_from_this()); if (alist()->automation_state() == Touch) {
alist()->stop_touch (mark, when);
AutomationWatch::instance().remove_automation_watch (shared_from_this());
}
}
} }