diff --git a/include/FxMixer.h b/include/FxMixer.h index 0857d696d..1b24bb54b 100644 --- a/include/FxMixer.h +++ b/include/FxMixer.h @@ -101,6 +101,8 @@ class FxRoute : public QObject { return m_to; } + + void updateName(); private: FxChannel * m_from; diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index a8f96c6c6..331d2b45d 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -52,6 +52,15 @@ FxRoute::~FxRoute() } +void FxRoute::updateName() +{ + if( m_amount) + { + m_amount->setDisplayName( + tr( "Amount to send from channel %1 to channel %2" ).arg( m_from->m_channelIndex ).arg( m_to->m_channelIndex ) ); + } +} + FxChannel::FxChannel( int idx, Model * _parent ) : m_fxChain( NULL ), @@ -661,4 +670,16 @@ void FxMixer::validateChannelName( int index, int oldIndex ) { fxc->m_name = tr( "FX %1" ).arg( index ); } + // set correct channel index + fxc->m_channelIndex = index; + + // now check all routes and update names of the send models + foreach( FxRoute * r, fxc->m_sends ) + { + r->updateName(); + } + foreach( FxRoute * r, fxc->m_receives ) + { + r->updateName(); + } }