diff --git a/plugins/ladspa_effect/LadspaControls.cpp b/plugins/ladspa_effect/LadspaControls.cpp index 86d0807b3..1dd572188 100644 --- a/plugins/ladspa_effect/LadspaControls.cpp +++ b/plugins/ladspa_effect/LadspaControls.cpp @@ -1,8 +1,8 @@ /* - * LadspaControls.cpp - model for LADSPA-plugin controls + * LadspaControls.cpp - model for LADSPA plugin controls + * + * Copyright (c) 2008-2010 Tobias Doerffel * - * Copyright (c) 2008-2009 Tobias Doerffel - * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ * */ - #include #include "LadspaEffect.h" @@ -35,6 +34,10 @@ LadspaControls::LadspaControls( LadspaEffect * _eff ) : m_noLink( false ), m_stereoLinkModel( true, this ) { + + connect( &m_stereoLinkModel, SIGNAL( dataChanged() ), + this, SLOT( updateLinkStatesFromGlobal() ) ); + multi_proc_t controls = m_effect->getPortControls(); m_controlCount = controls.count(); @@ -163,7 +166,7 @@ void LadspaControls::linkPort( Uint16 _port, bool _state ) -void LadspaControls::updateChannelLinkState() +void LadspaControls::updateLinkStatesFromGlobal() { if( m_stereoLinkModel.value() ) { @@ -183,10 +186,10 @@ void LadspaControls::updateChannelLinkState() m_controls[0][port]->setLink( false ); } } - else - { - m_noLink = false; - } + + // if global channel link state has changed, always ignore link + // status of individual ports in the future + m_noLink = false; } diff --git a/plugins/ladspa_effect/LadspaControls.h b/plugins/ladspa_effect/LadspaControls.h index 3e13517a0..1d048aeba 100644 --- a/plugins/ladspa_effect/LadspaControls.h +++ b/plugins/ladspa_effect/LadspaControls.h @@ -1,8 +1,8 @@ /* - * ladspa_controls.h - model for LADSPA-plugin controls + * LadspaControls.h - model for LADSPA plugin controls + * + * Copyright (c) 2008-2010 Tobias Doerffel * - * Copyright (c) 2008 Tobias Doerffel - * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * * This program is free software; you can redistribute it and/or @@ -61,7 +61,7 @@ public: protected slots: - void updateChannelLinkState(); + void updateLinkStatesFromGlobal(); void linkPort( Uint16 _port, bool _state );