summaryrefslogtreecommitdiff
path: root/gtk2_ardour/selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-30 22:53:22 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-30 22:53:22 +0000
commit7629120cda89dd4ec1b03ba4ddcc6f5dd1b0ca5a (patch)
tree8021cafa93fb6bec082a7362261f9040947f5329 /gtk2_ardour/selection.cc
parent664cec21359ba055243c3feaf47c6eb16fccbb3b (diff)
many changes, large and small, related to smart mode editing, range/region selection, and behaviour of playhead when always-play-range is enabled. could be buggy, but probably in subtle (or even very subtle) ways rather than obvious
git-svn-id: svn://localhost/ardour2/branches/3.0@11394 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r--gtk2_ardour/selection.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index ea74a6b919..caf8df2ae0 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -748,11 +748,21 @@ Selection::set (RegionView* r, bool also_clear_tracks)
void
Selection::set (vector<RegionView*>& v)
{
+ bool had_regions = !regions.empty();
+
clear_regions ();
+
if (Config->get_link_region_and_track_selection()) {
- clear_tracks ();
- // make sure to deselect any automation selections
- clear_points();
+ if (had_regions) {
+ /* there were regions before, so we're changing the
+ * region selection (likely), thus link region/track
+ * selection. relevant tracks will get selected
+ * as we ::add() below.
+ */
+ clear_tracks ();
+ // make sure to deselect any automation selections
+ clear_points();
+ }
}
add (v);
}