- if (_dragging) {
- remove_modal_grab();
- _dragging = false;
-
- if (note == _clicked_note) {
- _active_notes[note] = false;
- _clicked_note = no_note;
- send_note_off(note);
-
- invalidate_note_range(note, note);
+ if (false /*editor().current_mouse_mode() == Editing::MouseRange*/ ) { //Todo: this mode is buggy, and of questionable utility anyway
+
+ if (Keyboard::no_modifiers_active (ev->state)) {
+ AddNoteSelection (note); // EMIT SIGNAL
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
+ ToggleNoteSelection (note); // EMIT SIGNAL
+ } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::RangeSelectModifier)) {
+ ExtendNoteSelection (note); // EMIT SIGNAL
+ }
+
+ } else {
+
+ if (_dragging) {
+ remove_modal_grab();
+
+ if (note == _clicked_note) {
+ reset_clicked_note(note);
+ }