mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Arrangement: locate on double-click
This commit is contained in:
parent
e5e40c751f
commit
68ccbc8ac3
1 changed files with 15 additions and 0 deletions
|
|
@ -461,6 +461,21 @@ EditorSections::button_press (GdkEventButton* ev)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ev->type == GDK_2BUTTON_PRESS || ev->type == GDK_3BUTTON_PRESS) {
|
||||||
|
TreeView::Selection::ListHandle_Path rows = _view.get_selection ()->get_selected_rows ();
|
||||||
|
assert (!rows.empty ());
|
||||||
|
Gtk::TreeModel::Row row = *_model->get_iter (*rows.begin ());
|
||||||
|
|
||||||
|
if (column == _view.get_column (1)) {
|
||||||
|
timepos_t start = row[_columns.start];
|
||||||
|
_session->request_locate (start.samples());
|
||||||
|
} else if (column == _view.get_column (2)) {
|
||||||
|
timepos_t end = row[_columns.end];
|
||||||
|
_session->request_locate (end.samples());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (Gtkmm2ext::Keyboard::is_context_menu_event (ev)) {
|
if (Gtkmm2ext::Keyboard::is_context_menu_event (ev)) {
|
||||||
show_context_menu (ev->button, ev->time);
|
show_context_menu (ev->button, ev->time);
|
||||||
/* return false to select item under the mouse */
|
/* return false to select item under the mouse */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue