diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-04 01:03:36 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-04 01:03:36 +0000 |
commit | fde56cc730cc4d0fad1bccd19f9ebdae90ce0deb (patch) | |
tree | 195fc8e0a1557a60b9048edfba13d6a22efc4cd8 /gtk2_ardour/selection.cc | |
parent | aea2a9f0d774e0ed0ffd08911a6df7af81aa29a6 (diff) |
Unselect regions on tracks when the tracks are hidden. Fixes #3653.
git-svn-id: svn://localhost/ardour2/branches/3.0@8426 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index b135593a62..fa0df40336 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -1163,3 +1163,19 @@ Selection::set_state (XMLNode const & node, int) return 0; } + +void +Selection::remove_regions (TimeAxisView* t) +{ + RegionSelection::iterator i = regions.begin(); + while (i != regions.end ()) { + RegionSelection::iterator tmp = i; + ++tmp; + + if (&(*i)->get_time_axis_view() == t) { + remove (*i); + } + + i = tmp; + } +} |