MCP: cursor left/right should scroll; maybe fix vpots

git-svn-id: svn://localhost/ardour2/branches/3.0@11921 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-04-11 22:47:02 +00:00
parent bc52377c3e
commit c8ea24d2f4
2 changed files with 29 additions and 2 deletions

View File

@ -166,6 +166,19 @@ MackieControlProtocol::cursor_left_press (Button& )
} else {
ZoomOut (); /* EMIT SIGNAL */
}
} else {
float page_fraction;
if (_modifier_state == MODIFIER_CONTROL) {
page_fraction = 1.0;
} else if (_modifier_state == MODIFIER_OPTION) {
page_fraction = 0.1;
} else if (_modifier_state == MODIFIER_SHIFT) {
page_fraction = 2.0;
} else {
page_fraction = 0.25;
}
ScrollTimeline (page_fraction);
}
return off;
@ -187,8 +200,21 @@ MackieControlProtocol::cursor_right_press (Button& )
} else {
ZoomIn (); /* EMIT SIGNAL */
}
}
} else {
float page_fraction;
if (_modifier_state == MODIFIER_CONTROL) {
page_fraction = 1.0;
} else if (_modifier_state == MODIFIER_OPTION) {
page_fraction = 0.1;
} else if (_modifier_state == MODIFIER_SHIFT) {
page_fraction = 2.0;
} else {
page_fraction = 0.25;
}
ScrollTimeline (page_fraction);
}
return off;
}

View File

@ -388,7 +388,7 @@ Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev
{
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("SurfacePort::handle_midi_controller %1 = %2\n", (int) ev->controller_number, (int) ev->value));
Pot* pot = pots[ev->controller_number];
Pot* pot = pots[Pot::base_id + ev->controller_number];
if (!pot && ev->controller_number == Jog::base_id) {
pot = dynamic_cast<Pot*> (controls_by_name["jog"]);
@ -417,6 +417,7 @@ Surface::handle_midi_controller_message (MIDI::Parser &, MIDI::EventTwoBytes* ev
_mcp.add_in_use_timeout (*this, *pot, pot);
Strip* strip = dynamic_cast<Strip*> (&pot->group());
if (strip) {
strip->handle_pot (*pot, delta);
} else {