#include "gtkmm2ext/bindings.h"
#include "gtkmm2ext/utils.h"
-#include "gtkmm2ext/tearoff.h"
#include "canvas/canvas.h"
switch (mouse_mode) {
case MouseRange:
selection->clear_objects ();
- selection->ClearMidiNoteSelection (); /* EMIT SIGNAL */
+ selection->clear_midi_notes ();
break;
case MouseObject:
selection->clear_time ();
selection->clear_tracks ();
- selection->ClearMidiNoteSelection (); /* EMIT SIGNAL */
+ selection->clear_midi_notes ();
break;
case MouseDraw:
/* Clear regions, but not time or tracks, since that
/* almost no selection action on modified button-2 or button-3 events */
- if (item_type != RegionItem && event->button.button != 2) {
+ if ((item_type != RegionItem && event->button.button != 2)
+ /* for selection of control points prior to delete (shift-right click) */
+ && !(item_type == ControlPointItem && event->button.button == 3 && event->type == GDK_BUTTON_PRESS)) {
return;
}
}
/* for object/track exclusivity, we don't call set_selected_track_as_side_effect (op); */
if (eff_mouse_mode != MouseRange) {
- _mouse_changed_selection |= set_selected_control_point_from_click (press, op);
+ if (event->button.button != 3) {
+ _mouse_changed_selection |= set_selected_control_point_from_click (press, op);
+ } else {
+ _mouse_changed_selection |= set_selected_control_point_from_click (press, Selection::Set);
+ }
}
break;
break;
case AutomationTrackItem:
- if (eff_mouse_mode != MouseDraw) {
+ if (eff_mouse_mode != MouseDraw && op == Selection::Set) {
set_selected_track_as_side_effect (op);
}
break;
+ case NoteItem:
+ if (press && event->button.button == 3) {
+ NoteBase* cnote = reinterpret_cast<NoteBase*> (item->get_data ("notebase"));
+ assert (cnote);
+ if (cnote->region_view().selection_size() == 0 || !cnote->selected()) {
+ selection->clear_points();
+ cnote->region_view().unique_select (cnote);
+ /* we won't get the release, so store the selection change now */
+ begin_reversible_selection_op (X_("Button 3 Note Selection"));
+ commit_reversible_selection_op ();
+ }
+ }
+ break;
+
default:
break;
}
switch (item_type) {
case ControlPointItem:
- if (mouse_mode == MouseDraw || mouse_mode == MouseObject) {
+ if (mouse_mode == MouseDraw || mouse_mode == MouseObject || mouse_mode == MouseContent) {
cp = static_cast<ControlPoint*>(item->get_data ("control_point"));
cp->show ();
break;
case 2:
- begin_reversible_command (_("End point trim"));
+ begin_reversible_command (_("end point trim"));
if (selection->selected (rv)) {
selection->clear ();
}
- reset_focus ();
+ reset_focus (&contents());
}
/** Update _join_object_range_state which indicate whether we are over the top