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:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -241,8 +241,6 @@ GMCPGUI::GMCPGUI (GenericMidiControlProtocol& p)
|
||||
|
||||
pack_start (*table, false, false);
|
||||
|
||||
binding_changed ();
|
||||
|
||||
/* update the port connection combos */
|
||||
|
||||
update_port_combos ();
|
||||
|
||||
Reference in New Issue
Block a user