Skip to content

Commit

Permalink
Allow individual velocity/pan changes with alt
Browse files Browse the repository at this point in the history
This commit changes the behavior introduced in 6e3d4f4 to allow using
alt to change the velocity of multiple *selected* notes by dragging.

I believe this was the originally intended behavior, but it never worked for me.
  • Loading branch information
gandalf3 committed Oct 28, 2017
1 parent 9fb74d9 commit f12e3ac
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 @@ -2116,9 +2116,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 f12e3ac

Please sign in to comment.