Add Info TextFloat for Piano Roll Knife Tool (and make cut notes auto selected) (#7953)
* Adds an informative "TextFloat::displayMessage" when the knife tool is enabled. * Automatically selects short ends if shift is not held down.
This commit is contained in:
@@ -2218,6 +2218,10 @@ void PianoRoll::setKnifeAction()
|
||||
m_knifeDown = false;
|
||||
setCursor(Qt::ArrowCursor);
|
||||
update();
|
||||
|
||||
TextFloat::displayMessage(tr("Knife Tool"),
|
||||
tr("Click and drag over notes to cut along a line\nHold Shift to automatically remove short ends"),
|
||||
embed::getIconPixmap("edit_knife"), 4000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -385,6 +385,10 @@ void MidiClip::splitNotesAlongLine(const NoteVector notes, TimePos pos1, int key
|
||||
newNote2.setPos(keyIntercept);
|
||||
newNote2.setLength(note->endPos() - keyIntercept);
|
||||
|
||||
// Select the short ends
|
||||
if (newNote1.length() < newNote2.length()) { newNote1.setSelected(true); }
|
||||
else { newNote2.setSelected(true); }
|
||||
|
||||
if (deleteShortEnds)
|
||||
{
|
||||
addNote(newNote1.length() >= newNote2.length() ? newNote1 : newNote2, false);
|
||||
|
||||
Reference in New Issue
Block a user