if the action associated with a binding is insensitive, do not activate it, and return false from Bindings::activate()
This allows "stacking" of bindings by desensitizing the actions associated with a "lower" level of bindings at certain times (e.g. MIDI editing bindings thare are sensitized in the appropriate editing modes
This commit is contained in:
parent
cc74c7b7ad
commit
ffd9aa2fc9
@ -494,8 +494,13 @@ Bindings::activate (KeyboardKey kb, Operation op)
|
|||||||
|
|
||||||
if (action) {
|
if (action) {
|
||||||
/* lets do it ... */
|
/* lets do it ... */
|
||||||
DEBUG_TRACE (DEBUG::Bindings, string_compose ("binding for %1: %2\n", unshifted, k->second.action_name));
|
if (action->get_sensitive()) {
|
||||||
action->activate ();
|
DEBUG_TRACE (DEBUG::Bindings, string_compose ("binding for %1: %2\n", unshifted, k->second.action_name));
|
||||||
|
action->activate ();
|
||||||
|
} else {
|
||||||
|
DEBUG_TRACE (DEBUG::Bindings, string_compose ("binding for %1: %2 - insensitive, skipped\n", unshifted, k->second.action_name));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
DEBUG_TRACE (DEBUG::Bindings, string_compose ("binding for %1 is known but has no action\n", unshifted));
|
DEBUG_TRACE (DEBUG::Bindings, string_compose ("binding for %1 is known but has no action\n", unshifted));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user