From b01f093e37c22f504e500869d079487f8c656d49 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 8 Mar 2014 13:17:55 +0100 Subject: [PATCH] InstrumentTrack: hide sound shaping widgets for single-streamed instruments We currently don't apply envelopes/LFOs and filters to single-streamed instruments, therefore hide the GUI. --- include/InstrumentSoundShapingView.h | 2 ++ src/gui/widgets/InstrumentSoundShapingView.cpp | 7 +++++++ src/tracks/InstrumentTrack.cpp | 2 ++ 3 files changed, 11 insertions(+) diff --git a/include/InstrumentSoundShapingView.h b/include/InstrumentSoundShapingView.h index 51bea29e8..587b574c2 100644 --- a/include/InstrumentSoundShapingView.h +++ b/include/InstrumentSoundShapingView.h @@ -44,6 +44,8 @@ public: InstrumentSoundShapingView( QWidget * _parent ); virtual ~InstrumentSoundShapingView(); + void setFunctionsHidden( bool hidden ); + private: virtual void modelChanged(); diff --git a/src/gui/widgets/InstrumentSoundShapingView.cpp b/src/gui/widgets/InstrumentSoundShapingView.cpp index 7e54705d9..0ee39c29b 100644 --- a/src/gui/widgets/InstrumentSoundShapingView.cpp +++ b/src/gui/widgets/InstrumentSoundShapingView.cpp @@ -127,6 +127,13 @@ InstrumentSoundShapingView::~InstrumentSoundShapingView() +void InstrumentSoundShapingView::setFunctionsHidden( bool hidden ) +{ + m_targetsTabWidget->setHidden( hidden ); + m_filterGroupBox->setHidden( hidden ); +} + + void InstrumentSoundShapingView::modelChanged() { diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 5e5688169..d5ea42d78 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -1408,6 +1408,8 @@ void InstrumentTrackWindow::updateInstrumentView() m_tabWidget->addTab( m_instrumentView, tr( "PLUGIN" ), 0 ); m_tabWidget->setActiveTab( 0 ); + m_ssView->setFunctionsHidden( m_track->m_instrument->flags().testFlag( Instrument::IsSingleStreamed ) ); + modelChanged(); // Get the instrument window to refresh m_track->dataChanged(); // Get the text on the trackButton to change }