Set toggled automation controller using a double.

This commit is contained in:
nick_m 2015-10-20 00:48:30 +11:00
parent a4cf8e6afe
commit 78f2b2885f
1 changed files with 2 additions and 2 deletions

View File

@ -207,8 +207,8 @@ AutomationController::toggled ()
}
_controllable->list ()->set_in_write_pass (true, false, where);
}
_controllable->set_double (!but->get_active (), where, to_list);
/* set to opposite value.*/
_controllable->set_double (but->get_active () ? 0.0 : 1.0, where, to_list);
const bool active = _controllable->get_double (to_list, where) >= 0.5;
if (active && !but->get_active ()) {