summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_selection.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-01-18 03:06:15 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-01-18 03:06:15 +0000
commit143983948ecbdc9e9e4c4f3fe2541b2bea22be87 (patch)
tree02330d1cbe5fc4f52ff2edc6ee2dab954f9077c1 /gtk2_ardour/region_selection.cc
parent6b0e0e379b763795f1356d9fe5cce836350dd18d (diff)
more fun and games with selection logic
git-svn-id: svn://localhost/ardour2/trunk@1353 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/region_selection.cc')
-rw-r--r--gtk2_ardour/region_selection.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk2_ardour/region_selection.cc b/gtk2_ardour/region_selection.cc
index 430e1d3728..060c29792b 100644
--- a/gtk2_ardour/region_selection.cc
+++ b/gtk2_ardour/region_selection.cc
@@ -73,7 +73,7 @@ RegionSelection::clear_all()
_current_end = 0;
}
-bool RegionSelection::contains (RegionView* rv)
+bool RegionSelection::contains (RegionView* rv) const
{
return find (begin(), end(), rv) != end();
}
@@ -241,3 +241,15 @@ RegionSelection::sort_by_position_and_track ()
RegionSortByTrack sorter;
sort (sorter);
}
+
+bool
+RegionSelection::involves (const TimeAxisView& tv) const
+{
+ for (RegionSelection::const_iterator i = begin(); i != end(); ++i) {
+ if (&(*i)->get_trackview() == &tv) {
+ return true;
+ }
+ }
+ return false;
+}
+