+ /* no motion - select note */
+ NoteBase* cnote = reinterpret_cast<NoteBase*> (_item->get_data ("notebase"));
+ if (_editor->current_mouse_mode() == Editing::MouseContent ||
+ _editor->current_mouse_mode() == Editing::MouseDraw) {
+
+ bool changed = false;
+
+ if (_was_selected) {
+ bool add = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
+ if (add) {
+ region->note_deselected (cnote);
+ changed = true;
+ } else {
+ _editor->get_selection().clear_points();
+ region->unique_select (cnote);
+ changed = true;
+ }
+ } else {
+ bool extend = Keyboard::modifier_state_equals (event->button.state, Keyboard::TertiaryModifier);
+ bool add = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
+
+ if (!extend && !add && region->selection_size() > 1) {
+ _editor->get_selection().clear_points();
+ region->unique_select (cnote);
+ changed = true;
+ } else if (extend) {
+ region->note_selected (cnote, true, true);
+ changed = true;
+ } else {
+ /* it was added during button press */
+ changed = true;
+ }
+ }
+
+ if (changed) {
+ _editor->begin_reversible_selection_op(X_("Resize Select Note Release"));
+ _editor->commit_reversible_selection_op();
+ }
+ }
+