diff --git a/plugins/sf2_player/sf2_player.cpp b/plugins/sf2_player/sf2_player.cpp index 453ac05e6..f03153783 100644 --- a/plugins/sf2_player/sf2_player.cpp +++ b/plugins/sf2_player/sf2_player.cpp @@ -228,7 +228,7 @@ void sf2Instrument::saveSettings( QDomDocument & _doc, QDomElement & _this ) void sf2Instrument::loadSettings( const QDomElement & _this ) { - openFile( _this.attribute( "src" ) ); + openFile( _this.attribute( "src" ), false ); m_patchNum.loadSettings( _this, "patch" ); m_bankNum.loadSettings( _this, "bank" ); @@ -329,7 +329,7 @@ void sf2Instrument::freeFont() -void sf2Instrument::openFile( const QString & _sf2File ) +void sf2Instrument::openFile( const QString & _sf2File, bool updateTrackName ) { emit fileLoading(); @@ -390,7 +390,10 @@ void sf2Instrument::openFile( const QString & _sf2File ) delete[] sf2Ascii; - instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() ); + if( updateTrackName ) + { + instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() ); + } } diff --git a/plugins/sf2_player/sf2_player.h b/plugins/sf2_player/sf2_player.h index 1c1ef2764..9c7412bc1 100644 --- a/plugins/sf2_player/sf2_player.h +++ b/plugins/sf2_player/sf2_player.h @@ -2,7 +2,7 @@ * sf2_player.h - a soundfont2 player using fluidSynth * * Copyright (c) 2008 Paul Giblock - * Copyright (c) 2009 Tobias Doerffel + * Copyright (c) 2009-2013 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -91,7 +91,7 @@ public: public slots: - void openFile( const QString & _sf2File ); + void openFile( const QString & _sf2File, bool updateTrackName = true ); void updatePatch(); void updateSampleRate();