diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-26 21:22:36 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-26 21:22:36 +0000 |
commit | ab8ebe97bbb29a24176fcf353e034720bb83fa2a (patch) | |
tree | 04869050feaf47f188e3d1c656fe563fd7c274f1 /libs | |
parent | eda049116930e306231ce58d36e9b87bbe07b678 (diff) |
MCP: fix handling of vpot presses
git-svn-id: svn://localhost/ardour2/branches/3.0@12100 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.cc | 6 | ||||
-rw-r--r-- | libs/surfaces/mackie/mackie_control_protocol.h | 2 | ||||
-rw-r--r-- | libs/surfaces/mackie/strip.cc | 18 |
3 files changed, 21 insertions, 5 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index c1f5317976..ccd29a4d39 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -352,6 +352,10 @@ MackieControlProtocol::switch_banks (uint32_t initial, bool force) /* reset this to get the right display of view mode after the switch */ set_view_mode (_view_mode); + + /* make sure selection is correct */ + + // gui_track_selection_changed (_last_selected_routes); /* current bank has not been saved */ session->set_dirty(); @@ -1203,6 +1207,8 @@ MackieControlProtocol::gui_track_selection_changed (ARDOUR::RouteNotificationLis for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) { (*s)->gui_selection_changed (rl); } + + // _last_selected_routes = *rl; } framepos_t diff --git a/libs/surfaces/mackie/mackie_control_protocol.h b/libs/surfaces/mackie/mackie_control_protocol.h index 0df770b36e..8bcec0933a 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.h +++ b/libs/surfaces/mackie/mackie_control_protocol.h @@ -285,7 +285,7 @@ class MackieControlProtocol ButtonMap button_map; int16_t _ipmidi_base; bool needs_ipmidi_restart; - + void create_surfaces (); bool periodic(); void build_gui (); diff --git a/libs/surfaces/mackie/strip.cc b/libs/surfaces/mackie/strip.cc index af859ab41d..704671c84c 100644 --- a/libs/surfaces/mackie/strip.cc +++ b/libs/surfaces/mackie/strip.cc @@ -461,15 +461,25 @@ Strip::vselect_event (Button& button, ButtonState bs) int ms = _surface->mcp().modifier_state(); if (ms & MackieControlProtocol::MODIFIER_SHIFT) { - boost::shared_ptr<AutomationControl> ac = button.control (); - if (ac) { + /* get the corresponding vpot and whatever its + * controlling + */ + + Pot* pot = _surface->pots[Pot::ID + _index]; + + if (pot) { + boost::shared_ptr<AutomationControl> ac = pot->control (); - /* reset to default/normal value */ - ac->set_value (ac->normal()); + if (ac) { + + /* reset to default/normal value */ + ac->set_value (ac->normal()); + } } } else { + DEBUG_TRACE (DEBUG::MackieControl, "switching to next pot mode\n"); next_pot_mode (); } |