mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
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:
parent
eda0491169
commit
ab8ebe97bb
3 changed files with 21 additions and 5 deletions
|
|
@ -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 */
|
/* reset this to get the right display of view mode after the switch */
|
||||||
set_view_mode (_view_mode);
|
set_view_mode (_view_mode);
|
||||||
|
|
||||||
|
/* make sure selection is correct */
|
||||||
|
|
||||||
|
// gui_track_selection_changed (_last_selected_routes);
|
||||||
|
|
||||||
/* current bank has not been saved */
|
/* current bank has not been saved */
|
||||||
session->set_dirty();
|
session->set_dirty();
|
||||||
|
|
@ -1203,6 +1207,8 @@ MackieControlProtocol::gui_track_selection_changed (ARDOUR::RouteNotificationLis
|
||||||
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
|
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
|
||||||
(*s)->gui_selection_changed (rl);
|
(*s)->gui_selection_changed (rl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// _last_selected_routes = *rl;
|
||||||
}
|
}
|
||||||
|
|
||||||
framepos_t
|
framepos_t
|
||||||
|
|
|
||||||
|
|
@ -285,7 +285,7 @@ class MackieControlProtocol
|
||||||
ButtonMap button_map;
|
ButtonMap button_map;
|
||||||
int16_t _ipmidi_base;
|
int16_t _ipmidi_base;
|
||||||
bool needs_ipmidi_restart;
|
bool needs_ipmidi_restart;
|
||||||
|
|
||||||
void create_surfaces ();
|
void create_surfaces ();
|
||||||
bool periodic();
|
bool periodic();
|
||||||
void build_gui ();
|
void build_gui ();
|
||||||
|
|
|
||||||
|
|
@ -461,15 +461,25 @@ Strip::vselect_event (Button& button, ButtonState bs)
|
||||||
int ms = _surface->mcp().modifier_state();
|
int ms = _surface->mcp().modifier_state();
|
||||||
|
|
||||||
if (ms & MackieControlProtocol::MODIFIER_SHIFT) {
|
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 */
|
if (ac) {
|
||||||
ac->set_value (ac->normal());
|
|
||||||
|
/* reset to default/normal value */
|
||||||
|
ac->set_value (ac->normal());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, "switching to next pot mode\n");
|
DEBUG_TRACE (DEBUG::MackieControl, "switching to next pot mode\n");
|
||||||
next_pot_mode ();
|
next_pot_mode ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue