From 23e33010376852f8af8f67cc1d1eea0a01b29009 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 1 Oct 2009 03:45:04 -0700 Subject: [PATCH] FxMixerView - Left and right to select channels --- src/gui/FxMixerView.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index ad844ec4f..0cb3f1938 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -404,12 +404,22 @@ void FxMixerView::keyPressEvent(QKeyEvent * e) { moveChannelLeft( m_currentFxLine->channelIndex() ); } + else + { + // select channel to the left + setCurrentFxLine( m_currentFxLine->channelIndex()-1 ); + } break; case Qt::Key_Right: if( e->modifiers() & Qt::AltModifier ) { moveChannelRight( m_currentFxLine->channelIndex() ); } + else + { + // select channel to the right + setCurrentFxLine( m_currentFxLine->channelIndex()+1 ); + } break; } } @@ -418,7 +428,10 @@ void FxMixerView::keyPressEvent(QKeyEvent * e) void FxMixerView::setCurrentFxLine( int _line ) { - setCurrentFxLine( m_fxChannelViews[_line]->m_fxLine ); + if( _line >= 0 && _line < m_fxChannelViews.size() ) + { + setCurrentFxLine( m_fxChannelViews[_line]->m_fxLine ); + } }