diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-25 20:16:04 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-25 20:16:04 +0200 |
commit | 2fa34614d038e61e0c37144d95092c169fe2d0cc (patch) | |
tree | 680d9ec35ebaca93acefa1b091dc6d130f2b6a20 /libs/surfaces/faderport8/actions.cc | |
parent | bde3edf1c8f5075af5913eaea4dc81b199a17138 (diff) |
Remove unnecessary tests for touch-state
Diffstat (limited to 'libs/surfaces/faderport8/actions.cc')
-rw-r--r-- | libs/surfaces/faderport8/actions.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/libs/surfaces/faderport8/actions.cc b/libs/surfaces/faderport8/actions.cc index 8be8272a26..a710540b71 100644 --- a/libs/surfaces/faderport8/actions.cc +++ b/libs/surfaces/faderport8/actions.cc @@ -331,9 +331,7 @@ FaderPort8::button_solo_clear () if (!ac) { continue; } - if (ac->automation_state() == Touch && !ac->touching ()) { - ac->start_touch (ac->session().transport_frame()); - } + ac->start_touch (ac->session().transport_frame()); cl->push_back (ac); } if (!cl->empty()) { @@ -358,9 +356,7 @@ FaderPort8::button_mute_clear () continue; } cl->push_back (ac); - if (ac->automation_state() == Touch && !ac->touching ()) { - ac->start_touch (ac->session().transport_frame()); - } + ac->start_touch (ac->session().transport_frame()); } if (!cl->empty()) { session->set_controls (cl, 1.0, PBD::Controllable::NoGroup); @@ -400,9 +396,7 @@ FaderPort8::handle_encoder_pan (int steps) ac = s->pan_azimuth_control (); } if (ac) { - if (ac->automation_state() == Touch && !ac->touching ()) { - ac->start_touch (ac->session().transport_frame()); - } + ac->start_touch (ac->session().transport_frame()); if (steps == 0) { ac->set_value (ac->normal(), PBD::Controllable::UseGroup); } else { @@ -426,9 +420,7 @@ FaderPort8::handle_encoder_link (int steps) } double v = ac->internal_to_interface (ac->get_value()); - if (ac->automation_state() == Touch && !ac->touching ()) { - ac->start_touch (ac->session().transport_frame()); - } + ac->start_touch (ac->session().transport_frame()); if (steps == 0) { ac->set_value (ac->normal(), PBD::Controllable::UseGroup); @@ -535,9 +527,7 @@ FaderPort8::button_encoder () ac = session->master_out()->gain_control (); } if (ac) { - if (ac->automation_state() == Touch && !ac->touching ()) { - ac->start_touch (ac->session().transport_frame()); - } + ac->start_touch (ac->session().transport_frame()); ac->set_value (ac->normal(), PBD::Controllable::NoGroup); } } @@ -617,9 +607,7 @@ FaderPort8::encoder_navigate (bool neg, int steps) if (ac) { double v = ac->internal_to_interface (ac->get_value()); v = std::max (0.0, std::min (1.0, v + steps * (neg ? -.01 : .01))); - if (ac->automation_state() == Touch && !ac->touching ()) { - ac->start_touch (ac->session().transport_frame()); - } + ac->start_touch (ac->session().transport_frame()); ac->set_value (ac->interface_to_internal(v), PBD::Controllable::NoGroup); } } |