13
0

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:
Paul Davis 2015-01-26 16:37:53 -05:00
parent b9464fc4db
commit 0f46d7b107
2 changed files with 26 additions and 18 deletions

View File

@ -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;
}

View File

@ -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 */