Allow to select Arrangement sections

This also adds interaction with sections in the
Arrangement Ruler.

Note that selecting a range switches to the Range tool.
This is enforced because time-range selection is only meaningful
with tools that perform edit operations on the whole timeline.
This commit is contained in:
Robin Gareus 2023-09-07 21:25:08 +02:00
parent b6e9f37007
commit 019a3a1976
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
5 changed files with 92 additions and 1 deletions

View file

@ -231,6 +231,23 @@ EditorSections::selection_changed ()
timepos_t end = row[_columns.end];
_selection_change.block ();
switch (PublicEditor::instance ().current_mouse_mode ()) {
case Editing::MouseRange:
/* OK */
break;
case Editing::MouseObject:
if (ActionManager::get_toggle_action ("MouseMode", "set-mouse-mode-object-range")->get_active ()) {
/* smart mode; OK */
break;
}
/*fallthrough*/
default:
Glib::RefPtr<RadioAction> ract = ActionManager::get_radio_action (X_("MouseMode"), X_("set-mouse-mode-range"));
ract->set_active (true);
break;
}
Selection& s (PublicEditor::instance ().get_selection ());
s.clear ();
s.set (start, end);