From 27762a94378b690282c22f380d201dccfb6a2aa2 Mon Sep 17 00:00:00 2001 From: Amadeus Folego Date: Thu, 29 Jan 2015 20:04:30 -0200 Subject: [PATCH] Fix Shift+Resize for single note should be sticky --- src/gui/editors/PianoRoll.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index c14b6b930..92f7f0f1e 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -2460,6 +2460,8 @@ void PianoRoll::dragNotes( int x, int y, bool alt, bool shift, bool ctrl ) // will be our iterator in the following loop NoteVector::ConstIterator it = notes.begin(); + + int sNotes = selectionCount(); while( it != notes.end() ) { Note *note = *it; @@ -2468,8 +2470,9 @@ void PianoRoll::dragNotes( int x, int y, bool alt, bool shift, bool ctrl ) // When resizing notes: // If shift is pressed we resize and rearrange only the selected notes // If shift + ctrl then we also rearrange all posterior notes (sticky) + // If shift is pressed but only one note is selected, apply sticky if( m_action == ActionResizeNote && shift && - ( note->selected() || ctrl ) ) + ( note->selected() || ctrl || sNotes == 1 ) ) { int shifted_pos = note->oldPos().getTicks() + shift_offset; if( shifted_pos && pos == shift_ref_pos )