Restore custom generic midi settings #9062

DeviceInfo (bindings file) can include explicit motorized
and threshold settings. These values, when specified, are
used during load_bindings() during set_state and overwrote
any user customization.

Furthermore showing the GUI invalidated any prior setting
by explicitly calling binding_changed, which re-applies.
This commit is contained in:
Robin Gareus 2022-11-02 17:24:43 +01:00
parent cb548ede3d
commit 6813884857
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 9 additions and 10 deletions

View file

@ -682,14 +682,6 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
_feedback_interval = 10000;
}
if (!node.get_property ("threshold", _threshold)) {
_threshold = 10;
}
if (!node.get_property ("motorized", _motorised)) {
_motorised = false;
}
boost::shared_ptr<Controllable> c;
{
@ -715,6 +707,15 @@ GenericMidiControlProtocol::set_state (const XMLNode& node, int version)
}
}
/* Restore any custom settings which may have been overwritten by load_bindings */
if (!node.get_property ("threshold", _threshold)) {
_threshold = 10;
}
if (!node.get_property ("motorized", _motorised)) {
_motorised = false;
}
/* Load up specific bindings from the
* <Controls><MidiControllable>...</MidiControllable><Controls> section
*/

View file

@ -241,8 +241,6 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p)
pack_start (*table, false, false);
binding_changed ();
/* update the port connection combos */
update_port_combos ();