Do not display ENV/LFO tab in plugin window if controls are disabled in it (SF2 Player and OpulenZ)

This commit is contained in:
pascal
2014-03-18 21:09:32 -04:00
parent 41c154dc95
commit ed29f2b6f6

View File

@@ -1238,10 +1238,15 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
// FX tab
m_effectView = new EffectRackView( m_track->m_audioPort.effects(), m_tabWidget );
m_tabWidget->addTab( m_ssView, tr( "ENV/LFO" ), 1 );
m_tabWidget->addTab( instrumentFunctions, tr( "FUNC" ), 2 );
m_tabWidget->addTab( m_effectView, tr( "FX" ), 3 );
m_tabWidget->addTab( m_midiView, tr( "MIDI" ), 4 );
// Do not add ENV/LFO tab for the plugin window for SF2 Player and OpulenZ bcause it has no effecton them
int i = 1;
if (!m_track->m_instrument->flags().testFlag( Instrument::IsSingleStreamed ))
{
m_tabWidget->addTab( m_ssView, tr( "ENV/LFO" ), i++ );
}
m_tabWidget->addTab( instrumentFunctions, tr( "FUNC" ), i++ );
m_tabWidget->addTab( m_effectView, tr( "FX" ), i++ );
m_tabWidget->addTab( m_midiView, tr( "MIDI" ), i++ );
// setup piano-widget
m_pianoView = new PianoView( this );
@@ -1254,6 +1259,9 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
setModel( _itv->model() );
// Let the window know we may have a tab removed from the regular model
modelChanged(); // Get the instrument window to refresh
updateInstrumentView();
setFixedWidth( INSTRUMENT_WIDTH );