From 752f48f51cce73115903455fbda3ff3b8315772f Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sun, 23 Mar 2014 23:44:30 +0100 Subject: [PATCH] Revert "Do not display ENV/LFO tab in plugin window if controls are disabled in it (SF2 Player and OpulenZ)" This does not work well if you open an instrument window of a single streamed instrument, close it afterwards and open an instrument window of a regular instrument due to widget caching/reuse. We therefore have to find a better solution which allows dynamically showing/hiding tabs in the TabWidget class. Until then restore the previous behaviour. This reverts commit ed29f2b6f6aa8e93817dfc1c14ccf49de40b800f. --- src/tracks/InstrumentTrack.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 66dbb29fb..c6df21662 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -1238,15 +1238,10 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) : // FX tab m_effectView = new EffectRackView( m_track->m_audioPort.effects(), m_tabWidget ); - // 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++ ); + 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 ); // setup piano-widget m_pianoView = new PianoView( this ); @@ -1259,9 +1254,6 @@ 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 );