13
0

Fixed Mackie control port naming for extender use (fixes #6500)

This commit is contained in:
Len Ovens 2015-08-14 08:57:13 -07:00
parent ac1065b43b
commit 4129b8865c
4 changed files with 21 additions and 12 deletions

View File

@ -532,6 +532,7 @@ MackieControlProtocolGUI::action_changed (const Glib::ustring &sPath, const Glib
void
MackieControlProtocolGUI::surface_combo_changed ()
{
_cp.not_session_load();
_cp.set_device (_surface_combo.get_active_text());
/* update ipMIDI field */

View File

@ -110,6 +110,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session)
, _initialized (false)
, _surfaces_state (0)
, _surfaces_version (0)
, _session_load (true)
{
DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::MackieControlProtocol\n");

View File

@ -209,6 +209,9 @@ class MackieControlProtocol
int16_t ipmidi_base() const { return _ipmidi_base; }
void set_ipmidi_base (int16_t);
bool session_load () { return _session_load; }
void not_session_load () { _session_load = false; }
void midi_connectivity_established ();
protected:
@ -298,8 +301,9 @@ class MackieControlProtocol
bool _metering_active;
bool _initialized;
ARDOUR::RouteNotificationList _last_selected_routes;
XMLNode* _surfaces_state;
int _surfaces_version;
XMLNode* _surfaces_state;
int _surfaces_version;
bool _session_load;
boost::shared_ptr<ArdourSurface::Mackie::Surface> _master_surface;
struct ipMIDIHandler {

View File

@ -120,19 +120,22 @@ SurfacePort::set_state (const XMLNode& node, int version)
return 0;
}
// the rest should not be run if the device-name changes outside of a session load.
XMLNode* child;
if ( _surface->mcp().session_load()) {
if ((child = node.child (X_("Input"))) != 0) {
XMLNode* portnode = child->child (Port::state_node_name.c_str());
if (portnode) {
_async_in->set_state (*portnode, version);
XMLNode* child;
if ((child = node.child (X_("Input"))) != 0) {
XMLNode* portnode = child->child (Port::state_node_name.c_str());
if (portnode) {
_async_in->set_state (*portnode, version);
}
}
}
if ((child = node.child (X_("Output"))) != 0) {
XMLNode* portnode = child->child (Port::state_node_name.c_str());
if (portnode) {
_async_out->set_state (*portnode, version);
if ((child = node.child (X_("Output"))) != 0) {
XMLNode* portnode = child->child (Port::state_node_name.c_str());
if (portnode) {
_async_out->set_state (*portnode, version);
}
}
}