Hello, I have attached a short patch to enhance the use of the velocity ruler. After the change, it is possible to select the notes in matrix/notation view, useful to edit the velocity of one or more notes in a chord. Without selection, the clicked velocity-item (what you mean is what you get) is edited. It is possible to select multiple notes, so it is similar to the matrix-velocity tool.
Let me know if you know side effects, if there are objections or other constructive feedback. Note: selection drawing is persistent in notation view but there is a bug (ignored at moment) in matrix view: after the release of the mouse button in the velocity ruler, the selected events appear unselected in matrix view but the selection continues to exist. Perhaps the problem is ControlChangeCommand in ControlRuler::updateSegment(). I have fixed an inherent bug for the velocity-matrix tool today. There is a similar problem when we press the button "show velocity ruler" (you can see the bug also without the proposed change): - select multiple items in matrix view - show velocity ruler (the events appear unselected but the selection exists)
Index: src/gui/editors/matrix/MatrixView.cpp =================================================================== --- src/gui/editors/matrix/MatrixView.cpp (revision 14129) +++ src/gui/editors/matrix/MatrixView.cpp (working copy) @@ -746,6 +746,8 @@ ControlRulerWidget * cr = m_matrixWidget->getControlsWidget(); if (cr->isAnyRulerVisible()) { + cr->slotSelectionChanged(getSelection()); + enterActionState("have_control_ruler"); if (cr->hasSelection()) { enterActionState("have_controller_selection"); } Index: src/gui/editors/notation/NotationView.cpp =================================================================== --- src/gui/editors/notation/NotationView.cpp (revision 14129) +++ src/gui/editors/notation/NotationView.cpp (working copy) @@ -1187,6 +1187,8 @@ ControlRulerWidget * cr = m_notationWidget->getControlsWidget(); if (cr->isAnyRulerVisible()) { + cr->slotSelectionChanged(getSelection()); + enterActionState("have_control_ruler"); if (cr->hasSelection()) { enterActionState("have_controller_selection"); } Index: src/gui/rulers/PropertyAdjuster.cpp =================================================================== --- src/gui/rulers/PropertyAdjuster.cpp (revision 14129) +++ src/gui/rulers/PropertyAdjuster.cpp (working copy) @@ -51,17 +51,11 @@ PropertyAdjuster::handleLeftButtonPress(const ControlMouseEvent *e) { if (m_canSelect) { - if (e->itemList.size()) { - ControlItem *item = *(e->itemList.begin()); - if (item->isSelected()) { - - } else { - if (!(e->modifiers & (Qt::ShiftModifier | Qt::ControlModifier))) { - m_ruler->clearSelectedItems(); - } - - m_ruler->addToSelection(item); - } + unsigned int items = e->itemList.size(); + if (m_ruler->getSelectedItems()->empty() && items > 0) { + // If there aren't selected items, we select the last of + // the mouse click items because it is over the others. + m_ruler->addToSelection(e->itemList[items-1]); } }
------------------------------------------------------------------------------
_______________________________________________ Rosegarden-devel mailing list Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel