improve/fix mouse click logic on piano roll header
ctrl-click now toggles that note row's selected status, as intended
This commit is contained in:
parent
4974369787
commit
71ba96aa3b
@ -661,9 +661,11 @@ PianoRollHeader::on_button_press_event (GdkEventButton* ev)
|
||||
} else {
|
||||
int note = _view.y_to_note(ev->y);
|
||||
bool tertiary = Keyboard::modifier_state_contains (ev->state, Keyboard::TertiaryModifier);
|
||||
bool primary = Keyboard::modifier_state_contains (ev->state, Keyboard::PrimaryModifier);
|
||||
bool toggle = (ev->state == GDK_CONTROL_MASK);
|
||||
|
||||
if (ev->state == GDK_CONTROL_MASK){
|
||||
if (ev->type == GDK_2BUTTON_PRESS) {
|
||||
if (ev->type == GDK_2BUTTON_PRESS) {
|
||||
if (primary) {
|
||||
_adj.set_value (0.0);
|
||||
_adj.set_page_size (127.0);
|
||||
_adj.value_changed ();
|
||||
@ -677,6 +679,9 @@ PianoRollHeader::on_button_press_event (GdkEventButton* ev)
|
||||
} else if (tertiary && (ev->button == 1 || ev->button == 2)) {
|
||||
ExtendNoteSelection (note); // EMIT SIGNAL
|
||||
return true;
|
||||
} else if (toggle && (ev->button == 1 || ev->button == 2)) {
|
||||
ToggleNoteSelection (note); // EMIT SIGNAL
|
||||
return true;
|
||||
} else if (ev->button == 1 && note >= 0 && note < 128) {
|
||||
add_modal_grab();
|
||||
_dragging = true;
|
||||
|
Loading…
Reference in New Issue
Block a user