AutomatableModel: load connection settings before automation link
Controller connections got lost in case the control had automation patterns attached and thus the loadSettings() function returned prematurely.
This commit is contained in:
@@ -144,6 +144,18 @@ void AutomatableModel::loadSettings( const QDomElement& element, const QString&
|
||||
}
|
||||
}
|
||||
|
||||
QDomNode connectionNode = element.namedItem( "connection" );
|
||||
if( connectionNode.isElement() )
|
||||
{
|
||||
QDomNode thisConnection = node.toElement().namedItem( name );
|
||||
if( thisConnection.isElement() )
|
||||
{
|
||||
setControllerConnection( new ControllerConnection( (Controller*)NULL ) );
|
||||
m_controllerConnection->loadSettings( thisConnection.toElement() );
|
||||
//m_controllerConnection->setTargetName( displayName() );
|
||||
}
|
||||
}
|
||||
|
||||
node = element.namedItem( name );
|
||||
if( node.isElement() )
|
||||
{
|
||||
@@ -152,18 +164,6 @@ void AutomatableModel::loadSettings( const QDomElement& element, const QString&
|
||||
return;
|
||||
}
|
||||
|
||||
node = element.namedItem( "connection" );
|
||||
if( node.isElement() )
|
||||
{
|
||||
node = node.namedItem( name );
|
||||
if( node.isElement() )
|
||||
{
|
||||
setControllerConnection( new ControllerConnection( (Controller*)NULL ) );
|
||||
m_controllerConnection->loadSettings( node.toElement() );
|
||||
//m_controllerConnection->setTargetName( displayName() );
|
||||
}
|
||||
}
|
||||
|
||||
if( element.hasAttribute( name ) )
|
||||
{
|
||||
setInitValue( element.attribute( name ).toFloat() );
|
||||
|
||||
Reference in New Issue
Block a user