mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Handle generic-midi bindings per session.
This allows to special-cases session-specific control-surface state.
e.g. midi-learn.
Only restore midi-learned, session-specific, bindings when loading a
session with generic-midi enabled.
Also dis/re-enable generic-midi resets midi-learned, but no other
session-independent settings.
This also handles the edge case:
1) load global config, generic-midi = ON, w/ bindings.
state is remembered as cpi->state
2) load session-condig, generic-midi = OFF, cpi->state is retained
3) user enables the surface, cpi->state from (1) is applied.
-> invalid bindings applied -> fail
This commit is contained in:
parent
9df6e334fc
commit
b6b353d452
4 changed files with 9 additions and 4 deletions
|
|
@ -669,7 +669,10 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
|
|||
* <Controls><MidiControllable>...</MidiControllable><Controls> section
|
||||
*/
|
||||
|
||||
{
|
||||
bool load_dynamic_bindings = false;
|
||||
node.get_property ("session-state", load_dynamic_bindings);
|
||||
|
||||
if (load_dynamic_bindings) {
|
||||
Glib::Threads::Mutex::Lock lm2 (controllables_lock);
|
||||
nlist = node.children(); // "Controls"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue