summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-08-20 01:34:53 +1000
committernick_m <mainsbridge@gmail.com>2016-08-20 01:34:53 +1000
commit2d7bdda0be0fca64a51c2e26c992a25a517541eb (patch)
treed7ad953dbbec2c336721d0d1de2b5b19a1193b9f /gtk2_ardour
parent0016920347470c1cd89de022c6de0d762bd4222a (diff)
Extending an empty selection selects the clicked region.
- fixes a crash where the first operation on loading a session is a constrained drag
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_selection.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc
index c5ba764af8..f2681b58e2 100644
--- a/gtk2_ardour/editor_selection.cc
+++ b/gtk2_ardour/editor_selection.cc
@@ -879,7 +879,12 @@ Editor::set_selected_regionview_from_click (bool press, Selection::Operation op)
if (!regions.empty()) {
selection->add (regions);
commit = true;
+ } else if (selection->regions.empty() && !selection->selected (clicked_regionview)) {
+ /* ensure that at least the clicked regionview is selected. */
+ selection->set (clicked_regionview);
+ commit = true;
}
+
}
out: