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 f049d0294c
commit afdedbf948

View File

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