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:
@ -300,6 +303,7 @@ class MackieControlProtocol
ARDOUR::RouteNotificationList _last_selected_routes;
XMLNode* _surfaces_state;
int _surfaces_version;
bool _session_load;
boost::shared_ptr<ArdourSurface::Mackie::Surface> _master_surface;
struct ipMIDIHandler {

View File

@ -120,6 +120,8 @@ 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.
if ( _surface->mcp().session_load()) {
XMLNode* child;
if ((child = node.child (X_("Input"))) != 0) {
@ -135,6 +137,7 @@ SurfacePort::set_state (const XMLNode& node, int version)
_async_out->set_state (*portnode, version);
}
}
}
return 0;
}