mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
freehand draw for velocity only affects selected notes, if any are selected (#9491)
This commit is contained in:
parent
edc0e636e2
commit
d88b9d36ca
2 changed files with 13 additions and 1 deletions
|
|
@ -3392,7 +3392,9 @@ MidiRegionView::change_note_length (NoteBase* event, Temporal::Beats t)
|
||||||
void
|
void
|
||||||
MidiRegionView::begin_drag_edit (std::string const & why)
|
MidiRegionView::begin_drag_edit (std::string const & why)
|
||||||
{
|
{
|
||||||
|
if (!_selected) {
|
||||||
trackview.editor().get_selection().set (this, true);
|
trackview.editor().get_selection().set (this, true);
|
||||||
|
}
|
||||||
start_note_diff_command (why);
|
start_note_diff_command (why);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,17 @@ VelocityGhostRegion::note_selected (NoteBase* ev)
|
||||||
void
|
void
|
||||||
VelocityGhostRegion::lollis_between (int x0, int x1, std::vector<NoteBase*>& within)
|
VelocityGhostRegion::lollis_between (int x0, int x1, std::vector<NoteBase*>& within)
|
||||||
{
|
{
|
||||||
|
MidiRegionView* mrv = dynamic_cast<MidiRegionView*> (&parent_rv);
|
||||||
|
assert (mrv);
|
||||||
|
MidiRegionView::Selection const & sel (mrv->selection());
|
||||||
|
bool only_selected = !sel.empty();
|
||||||
|
|
||||||
for (auto & gev : events) {
|
for (auto & gev : events) {
|
||||||
|
if (only_selected) {
|
||||||
|
if (!gev.second->event->selected()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
ArdourCanvas::Lollipop* l = dynamic_cast<ArdourCanvas::Lollipop*> (gev.second->item);
|
ArdourCanvas::Lollipop* l = dynamic_cast<ArdourCanvas::Lollipop*> (gev.second->item);
|
||||||
if (l) {
|
if (l) {
|
||||||
ArdourCanvas::Duple pos = l->item_to_canvas (ArdourCanvas::Duple (l->x(), l->y0()));
|
ArdourCanvas::Duple pos = l->item_to_canvas (ArdourCanvas::Duple (l->x(), l->y0()));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue