ability to scroll left and right while using ctrl to select notes

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1885 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Andrew Kelley
2008-12-08 18:36:33 +00:00
parent 689ee4cb14
commit 809f7befbb
2 changed files with 17 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
2008-12-08 Andrew Kelley <superjoe30/at/gmail/dot/com>
* src/gui/piano_roll.cpp:
ability to scroll left and right while using ctrl to select notes
2008-12-08 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/resources_tree_model.cpp:

View File

@@ -751,7 +751,8 @@ void pianoRoll::keyPressEvent( QKeyEvent * _ke )
switch( _ke->key() )
{
case Qt::Key_Up:
if( _ke->modifiers() & Qt::ControlModifier )
if( (_ke->modifiers() & Qt::ControlModifier)
&& m_action == ActionNone )
{
// shift selection up an octave
// if nothing selected, shift _everything_
@@ -772,7 +773,8 @@ void pianoRoll::keyPressEvent( QKeyEvent * _ke )
}
break;
case Qt::Key_Down:
if( _ke->modifiers() & Qt::ControlModifier )
if( _ke->modifiers() & Qt::ControlModifier
&& m_action == ActionNone )
{
// shift selection down an octave
// if nothing selected, shift _everything_
@@ -795,7 +797,8 @@ void pianoRoll::keyPressEvent( QKeyEvent * _ke )
case Qt::Key_Left:
{
if( _ke->modifiers() & Qt::ControlModifier )
if( _ke->modifiers() & Qt::ControlModifier
&& m_action == ActionNone)
{
// move time ticker
if( ( m_timeLine->pos() -= 16 ) < 0 )
@@ -804,7 +807,8 @@ void pianoRoll::keyPressEvent( QKeyEvent * _ke )
}
m_timeLine->updatePosition();
}
else if( _ke->modifiers() & Qt::ShiftModifier )
else if( _ke->modifiers() & Qt::ShiftModifier
&& m_action == ActionNone)
{
// move notes
bool quantized = ! (_ke->modifiers() & Qt::AltModifier);
@@ -829,13 +833,15 @@ void pianoRoll::keyPressEvent( QKeyEvent * _ke )
}
case Qt::Key_Right:
{
if( _ke->modifiers() & Qt::ControlModifier )
if( _ke->modifiers() & Qt::ControlModifier
&& m_action == ActionNone)
{
// move time ticker
m_timeLine->pos() += 16;
m_timeLine->updatePosition();
}
else if( _ke->modifiers() & Qt::ShiftModifier )
else if( _ke->modifiers() & Qt::ShiftModifier
&& m_action == ActionNone)
{
// move notes
bool quantized = ! (_ke->modifiers() & Qt::AltModifier);