ignore context menu click events, notably during drag but also for a couple of other purposes
Conflicts: gtk2_ardour/editor_canvas_events.cc
This commit is contained in:
parent
b9464fc4db
commit
0f46d7b107
@ -176,21 +176,25 @@ Editor::canvas_scroll_event (GdkEventScroll *event, bool from_canvas)
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::track_canvas_button_press_event (GdkEventButton */*event*/)
|
||||
Editor::track_canvas_button_press_event (GdkEventButton *event)
|
||||
{
|
||||
begin_reversible_selection_op (_("Clear Selection Click (track canvas)"));
|
||||
selection->clear ();
|
||||
commit_reversible_selection_op();
|
||||
_track_canvas->grab_focus();
|
||||
if (!Keyboard::is_context_menu_event (event)) {
|
||||
begin_reversible_selection_op (_("Clear Selection Click (track canvas)"));
|
||||
selection->clear ();
|
||||
commit_reversible_selection_op();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
Editor::track_canvas_button_release_event (GdkEventButton *event)
|
||||
{
|
||||
if (_drags->active ()) {
|
||||
_drags->end_grab ((GdkEvent*) event);
|
||||
}
|
||||
if (!Keyboard::is_context_menu_event (event)) {
|
||||
if (_drags->active ()) {
|
||||
_drags->end_grab ((GdkEvent*) event);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1191,20 +1191,24 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
return true;
|
||||
}
|
||||
|
||||
/* see if we're finishing a drag */
|
||||
bool were_dragging = false;
|
||||
|
||||
bool were_dragging = false;
|
||||
if (_drags->active ()) {
|
||||
bool const r = _drags->end_grab (event);
|
||||
if (r) {
|
||||
/* grab dragged, so do nothing else */
|
||||
return true;
|
||||
}
|
||||
if (!Keyboard::is_context_menu_event (&event->button)) {
|
||||
|
||||
were_dragging = true;
|
||||
}
|
||||
/* see if we're finishing a drag */
|
||||
|
||||
if (_drags->active ()) {
|
||||
bool const r = _drags->end_grab (event);
|
||||
if (r) {
|
||||
/* grab dragged, so do nothing else */
|
||||
return true;
|
||||
}
|
||||
|
||||
were_dragging = true;
|
||||
}
|
||||
|
||||
update_region_layering_order_editor ();
|
||||
update_region_layering_order_editor ();
|
||||
}
|
||||
|
||||
/* edit events get handled here */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user