summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-01-16 12:17:09 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:13 -0400
commitba981a14c4fb7e6bfe1a7434e81cdecac422c838 (patch)
treeef80088a3f00d27475d48023975cc6cba7794575 /gtk2_ardour/editor_selection.cc
parent2a5dbff87ba42d84e86285c92b9afc69f1edf07b (diff)
initial version of playback priority design. No GUI control over options yet
Conflicts: libs/ardour/ardour/session.h libs/ardour/ardour/types.h libs/ardour/enums.cc libs/ardour/session_transport.cc system_config
Diffstat (limited to 'gtk2_ardour/editor_selection.cc')
-rw-r--r--gtk2_ardour/editor_selection.cc30
1 files changed, 27 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index b071ed6e1b..135f15da29 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -652,9 +652,12 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op)
if (press)
goto out;
else {
- get_equivalent_regions(clicked_regionview, all_equivalent_regions, ARDOUR::Properties::select.property_id);
- selection->set(all_equivalent_regions);
- commit = true;
+ if (selection->regions.size() > 1) {
+ /* collapse region selection down to just this one region (and its equivalents) */
+ get_equivalent_regions(clicked_regionview, all_equivalent_regions, ARDOUR::Properties::select.property_id);
+ selection->set(all_equivalent_regions);
+ commit = true;
+ }
}
}
break;
@@ -1027,6 +1030,16 @@ Editor::time_selection_changed ()
} else {
ActionManager::set_sensitive (ActionManager::time_selection_sensitive_actions, true);
}
+
+ /* propagate into backend */
+
+ if (_session) {
+ if (selection->time.length() != 0) {
+ _session->set_range_selection (selection->time.start(), selection->time.end_frame());
+ } else {
+ _session->clear_range_selection ();
+ }
+ }
}
/** Set all region actions to have a given sensitivity */
@@ -1337,6 +1350,17 @@ Editor::region_selection_changed ()
if (_session && !_session->transport_rolling() && !selection->regions.empty()) {
maybe_locate_with_edit_preroll (selection->regions.start());
}
+
+ /* propagate into backend */
+
+ if (_session) {
+ if (!selection->regions.empty()) {
+ _session->set_object_selection (selection->regions.start(), selection->regions.end_frame());
+ } else {
+ _session->clear_object_selection ();
+ }
+ }
+
}
void