Fixed issue with audioFileProcessor tracks being renamed when loading
a saved song. Modified Files: plugins/audio_file_processor/audio_file_processor.cpp plugins/audio_file_processor/audio_file_processor.h git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@136 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -313,7 +313,7 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
if( _this.attribute( "src" ) != "" )
|
||||
{
|
||||
setAudioFile( _this.attribute( "src" ) );
|
||||
setAudioFile( _this.attribute( "src" ), FALSE );
|
||||
}
|
||||
else if( _this.attribute( "sampledata" ) != "" )
|
||||
{
|
||||
@@ -368,12 +368,13 @@ Uint32 audioFileProcessor::getBeatLen( notePlayHandle * _n ) const
|
||||
|
||||
|
||||
|
||||
void audioFileProcessor::setAudioFile( const QString & _audio_file )
|
||||
void audioFileProcessor::setAudioFile( const QString & _audio_file, bool _rename )
|
||||
{
|
||||
// is current channel-name equal to previous-filename??
|
||||
if( getInstrumentTrack()->name() ==
|
||||
if( _rename &&
|
||||
( getInstrumentTrack()->name() ==
|
||||
QFileInfo( m_sampleBuffer.audioFile() ).fileName() ||
|
||||
m_sampleBuffer.audioFile() == "" )
|
||||
m_sampleBuffer.audioFile() == "" ) )
|
||||
{
|
||||
// then set it to new one
|
||||
getInstrumentTrack()->setName( QFileInfo( _audio_file
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
|
||||
public slots:
|
||||
void setAudioFile( const QString & _audio_file );
|
||||
void setAudioFile( const QString & _audio_file, bool _rename = TRUE );
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
Reference in New Issue
Block a user