Skip to content

Commit

Permalink
Allow individual velocity/pan changes with alt (#3923)
Browse files Browse the repository at this point in the history
Fix regression caused by 6e3d4f4, allow ALT to change the velocity of multiple selected notes.
  • Loading branch information
gandalf3 authored and tresf committed Dec 22, 2017
1 parent 7de9649 commit 2c3df22
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2121,9 +2121,14 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me )
bool isUnderPosition = n->withinRange( ticks_start, ticks_end );
// Play note under the cursor
if ( isUnderPosition ) { testPlayNote( n ); }
// If note is the one under the cursor or is selected when alt is
// not pressed
if ( ( isUnderPosition && !isSelection() ) || ( n->selected() && !altPressed ) )
// If note is:
// Under the cursor, when there is no selection
// Selected, and alt is not pressed
// Under the cursor, selected, and alt is pressed
if ( ( isUnderPosition && !isSelection() ) ||
( n->selected() && !altPressed ) ||
( isUnderPosition && n->selected() && altPressed )
)
{
if( m_noteEditMode == NoteEditVolume )
{
Expand Down

0 comments on commit 2c3df22

Please sign in to comment.