MCP: fix handling of vpot presses

git-svn-id: svn://localhost/ardour2/branches/3.0@12100 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-04-26 21:22:36 +00:00
parent eda0491169
commit ab8ebe97bb
3 changed files with 21 additions and 5 deletions

View file

@ -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

View file

@ -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 ();

View file

@ -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 ();
}