added compat-code for loading old presets where content-node is named "channelsettings"
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1294 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2008-07-07 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* src/core/mmp.cpp:
|
||||
added compat-code for loading old presets where content-node is named
|
||||
"channelsettings"
|
||||
|
||||
* plugins/sf2_player/sf2_player.cpp:
|
||||
* plugins/sf2_player/sf2_player.h:
|
||||
added support for pitch-bending
|
||||
|
||||
@@ -151,28 +151,16 @@ multimediaProject::multimediaProject( const QString & _in_file_name,
|
||||
|
||||
QDomElement root = documentElement();
|
||||
m_type = type( root.attribute( "type" ) );
|
||||
QDomNode node = root.firstChild();
|
||||
while( !node.isNull() )
|
||||
{
|
||||
if( node.isElement() )
|
||||
{
|
||||
if( node.nodeName() == "head" )
|
||||
{
|
||||
m_head = node.toElement();
|
||||
}
|
||||
else if( node.nodeName() == typeName( m_type ) )
|
||||
{
|
||||
m_content = node.toElement();
|
||||
}
|
||||
}
|
||||
node = node.nextSibling();
|
||||
}
|
||||
m_head = root.elementsByTagName( "head" ).item( 0 ).toElement();
|
||||
|
||||
if( _upgrade && root.hasAttribute( "creatorversion" ) &&
|
||||
root.attribute( "creatorversion" ) != LMMS_VERSION )
|
||||
{
|
||||
upgrade();
|
||||
}
|
||||
|
||||
m_content = root.elementsByTagName( typeName( m_type ) ).
|
||||
item( 0 ).toElement();
|
||||
}
|
||||
|
||||
|
||||
@@ -280,17 +268,16 @@ multimediaProject::ProjectTypes multimediaProject::type(
|
||||
{
|
||||
for( int i = 0; i < NumProjectTypes; ++i )
|
||||
{
|
||||
if( s_types[i].m_name == _type_name || (
|
||||
s_types[i].m_name.contains( "," ) && (
|
||||
s_types[i].m_name.section( ',', 0, 0 ) == _type_name ||
|
||||
s_types[i].m_name.section( ',', 1, 1 ) == _type_name ) )
|
||||
)
|
||||
|
||||
if( s_types[i].m_name == _type_name )
|
||||
{
|
||||
return( static_cast<multimediaProject::ProjectTypes>(
|
||||
i ) );
|
||||
}
|
||||
}
|
||||
if( _type_name == "channelsettings" )
|
||||
{
|
||||
return( multimediaProject::InstrumentTrackSettings );
|
||||
}
|
||||
return( UnknownType );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user