13
0

Arrangement: locate on double-click

This commit is contained in:
Robin Gareus 2023-09-05 22:22:50 +02:00
parent e5e40c751f
commit 68ccbc8ac3
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -461,6 +461,21 @@ EditorSections::button_press (GdkEventButton* ev)
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)) {
show_context_menu (ev->button, ev->time);
/* return false to select item under the mouse */