diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-12-15 08:47:15 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-12-16 06:01:38 -0500 |
commit | 1152bf87a25cc2948514708f7c4a351d041da178 (patch) | |
tree | cca9771ec1ca3fc69b0a6fb20fc36c92abfb894a /libs | |
parent | a6da818bc4df1b4b1776b384755d4c49ded86599 (diff) |
make vselect-press in subview mode act as a toggle for toggled controls
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/strip.cc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index 17bd40e0a0..600c4fccca 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -764,6 +764,28 @@ Strip::select_event (Button&, ButtonState bs) void Strip::vselect_event (Button&, ButtonState bs) { + if (_surface->mcp().subview_mode() != None) { + + /* subview mode: vpot press acts like a button for toggle parameters */ + + if (bs != press) { + return; + } + + boost::shared_ptr<AutomationControl> control = _vpot->control (); + if (!control) { + return; + } + + if (control->toggled()) { + if (control->toggled()) { + control->set_value (!control->get_value()); + } + } + + return; + } + if (bs == press) { int ms = _surface->mcp().main_modifier_state(); @@ -1939,4 +1961,3 @@ Strip::notify_metering_state_changed() _transport_is_rolling = transport_is_rolling; _metering_active = metering_active; } - |