Extending an empty selection selects the clicked region.
authornick_m <mainsbridge@gmail.com>
Fri, 19 Aug 2016 15:34:53 +0000 (01:34 +1000)
committernick_m <mainsbridge@gmail.com>
Fri, 19 Aug 2016 15:34:53 +0000 (01:34 +1000)
- fixes a crash where the first operation on loading a session
  is a constrained drag

gtk2_ardour/editor_selection.cc

index c5ba764af8a5f32d11389edc005b47615f07b393..f2681b58e25e5ea32379c95a02314a26f05e1278 100644 (file)
@@ -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: