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:
@@ -1,3 +1,12 @@
|
||||
2006-05-22 Danny McRae <khjklujn/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/audio_file_processor/audio_file_processor.h:
|
||||
* plugins/audio_file_processor/audio_file_processor.cpp:
|
||||
added a switch to setAudioFile to force the track name to be
|
||||
used for the track if a name already exists. Fixes the problem
|
||||
of having tracks being renamed to the file name when loading a
|
||||
saved song.
|
||||
|
||||
2006-05-20 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* data/locale/de.ts:
|
||||
|
||||
@@ -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