X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fpiano_roll_header.cc;h=8a67ec75016c0e145359ee97b3e05960eeef4e52;hb=20ea90a186748f34061fec323faa74f084c7937c;hp=878cbb72d876e1d815857ea7946dbe170ec27f15;hpb=1f313ec19c4c60de8ce4288c98f2632ee78fbcdc;p=ardour.git diff --git a/gtk2_ardour/piano_roll_header.cc b/gtk2_ardour/piano_roll_header.cc index 878cbb72d8..8a67ec7501 100644 --- a/gtk2_ardour/piano_roll_header.cc +++ b/gtk2_ardour/piano_roll_header.cc @@ -513,17 +513,15 @@ bool PianoRollHeader::on_button_press_event (GdkEventButton* ev) { int note = _view.y_to_note(ev->y); - - if (ev->button == 2 && ev->type == GDK_BUTTON_PRESS) { - if (Keyboard::no_modifiers_active (ev->state)) { - SetNoteSelection (note); // EMIT SIGNAL - return true; - } - return false; - } - - if (ev->button == 1 && ev->type == GDK_BUTTON_PRESS && note >= 0 && note < 128) { - + bool tertiary = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier); + + if (ev->button == 2 && Keyboard::no_modifiers_active (ev->state)) { + SetNoteSelection (note); // EMIT SIGNAL + return true; + } else if (tertiary && (ev->button == 1 || ev->button == 2)) { + ExtendNoteSelection (note); // EMIT SIGNAL + return true; + } else if (ev->button == 1 && note >= 0 && note < 128) { add_modal_grab(); _dragging = true;