SF2/VST title rename #462 w/ #774 recommendations

This commit is contained in:
tresf
2014-06-04 08:52:12 -04:00
parent ab493ea27f
commit f42196315c
2 changed files with 8 additions and 7 deletions

View File

@@ -352,9 +352,9 @@ void sf2Instrument::openFile( const QString & _sf2File, bool updateTrackName )
delete[] sf2Ascii;
if( updateTrackName )
if( updateTrackName || instrumentTrack()->displayName() == displayName())
{
instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() );
instrumentTrack()->setName( QFileInfo( _sf2File ).baseName() );
}
}

View File

@@ -237,9 +237,10 @@ void vestigeInstrument::loadFile( const QString & _file )
{
m_pluginMutex.lock();
const bool set_ch_name = ( m_plugin != NULL &&
instrumentTrack()->name() == m_plugin->name() ) ||
instrumentTrack()->name() ==
InstrumentTrack::tr( "Default preset" );
instrumentTrack()->name() == m_plugin->name() ) ||
instrumentTrack()->name() == InstrumentTrack::tr( "Default preset" ) ||
instrumentTrack()->name() == displayName();
m_pluginMutex.unlock();
if ( m_plugin != NULL )
@@ -310,12 +311,12 @@ void vestigeInstrument::play( sampleFrame * _buf )
bool vestigeInstrument::handleMidiEvent( const MidiEvent& event, const MidiTime& time, f_cnt_t offset )
bool vestigeInstrument::handleMidiEvent( const MidiEvent& event, const MidiTime& time )
{
m_pluginMutex.lock();
if( m_plugin != NULL )
{
m_plugin->processMidiEvent( event, offset );
m_plugin->processMidiEvent( event, time );
}
m_pluginMutex.unlock();