mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
mackie: fix stupid thinko, and use BaseUI::access_action() to correctly accesss GUI actions
This commit is contained in:
parent
c69514afe9
commit
5eccbbfbd6
3 changed files with 13 additions and 36 deletions
|
|
@ -60,7 +60,7 @@ LedState
|
|||
MackieControlProtocol::option_press (Button &)
|
||||
{
|
||||
_modifier_state |= MODIFIER_OPTION;
|
||||
gui_invoke ("Editor/set-loop-from-edit-range");
|
||||
access_action ("Editor/set-loop-from-edit-range");
|
||||
return on;
|
||||
}
|
||||
LedState
|
||||
|
|
@ -74,7 +74,7 @@ MackieControlProtocol::control_press (Button &)
|
|||
{
|
||||
_modifier_state |= MODIFIER_CONTROL;
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Press: modifier state now set to %1\n", _modifier_state));
|
||||
gui_invoke ("Editor/set-punch-from-edit-range");
|
||||
access_action ("Editor/set-punch-from-edit-range");
|
||||
return on;
|
||||
}
|
||||
LedState
|
||||
|
|
@ -88,7 +88,7 @@ LedState
|
|||
MackieControlProtocol::cmd_alt_press (Button &)
|
||||
{
|
||||
_modifier_state |= MODIFIER_CMDALT;
|
||||
gui_invoke ("Editor/set-session-from-edit-range");
|
||||
access_action ("Editor/set-session-from-edit-range");
|
||||
return on;
|
||||
}
|
||||
LedState
|
||||
|
|
@ -346,26 +346,21 @@ MackieControlProtocol::scrub_release (Mackie::Button &)
|
|||
LedState
|
||||
MackieControlProtocol::undo_press (Button&)
|
||||
{
|
||||
if (main_modifier_state() & MODIFIER_SHIFT) {
|
||||
Redo(); /* EMIT SIGNAL */
|
||||
} else {
|
||||
Undo(); /* EMIT SIGNAL */
|
||||
}
|
||||
return off;
|
||||
toggle_punch_out ();
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::undo_release (Button&)
|
||||
{
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::drop_press (Button &)
|
||||
{
|
||||
gui_invoke ("Editor/start-range-from-playhead");
|
||||
update_global_button (Button::Replace, flashing);
|
||||
return on;
|
||||
access_action ("Editor/start-range-from-playhead");
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
|
|
@ -511,7 +506,7 @@ MackieControlProtocol::rewind_press (Button &)
|
|||
if (modifier_state() & MODIFIER_MARKER) {
|
||||
prev_marker ();
|
||||
} else if (modifier_state() & MODIFIER_NUDGE) {
|
||||
gui_invoke ("Editor/nudge-playhead-backward");
|
||||
access_action ("Editor/nudge-playhead-backward");
|
||||
} else if (main_modifier_state() == MODIFIER_SHIFT) {
|
||||
goto_start ();
|
||||
} else {
|
||||
|
|
@ -532,7 +527,7 @@ MackieControlProtocol::ffwd_press (Button &)
|
|||
if (modifier_state() & MODIFIER_MARKER) {
|
||||
next_marker ();
|
||||
} else if (modifier_state() & MODIFIER_NUDGE) {
|
||||
gui_invoke ("Editor/nudge-playhead-forward");
|
||||
access_action ("Editor/nudge-playhead-forward");
|
||||
} else if (main_modifier_state() == MODIFIER_SHIFT) {
|
||||
goto_end();
|
||||
} else {
|
||||
|
|
@ -1045,9 +1040,9 @@ MackieControlProtocol::nudge_release (Mackie::Button&)
|
|||
*/
|
||||
|
||||
if (main_modifier_state() & MODIFIER_SHIFT) {
|
||||
gui_invoke ("Region/nudge-backward");
|
||||
access_action ("Region/nudge-backward");
|
||||
} else {
|
||||
gui_invoke ("Region/nudge-forward");
|
||||
access_action ("Region/nudge-forward");
|
||||
}
|
||||
|
||||
return off;
|
||||
|
|
@ -1055,8 +1050,7 @@ MackieControlProtocol::nudge_release (Mackie::Button&)
|
|||
Mackie::LedState
|
||||
MackieControlProtocol::replace_press (Mackie::Button&)
|
||||
{
|
||||
gui_invoke ("Editor/finish-range-from-playhead");
|
||||
update_global_button (Button::Drop, off);
|
||||
access_action ("Editor/finish-range-from-playhead");
|
||||
return off;
|
||||
}
|
||||
Mackie::LedState
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue