summaryrefslogtreecommitdiff
path: root/gtk2_ardour/track_selection.cc
blob: 5e2922449144487193fb5fe39d278365fec0a995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <algorithm>
#include "track_selection.h"

using namespace std;

list<TimeAxisView*>
TrackSelection::add (list<TimeAxisView*> const & t)
{
	list<TimeAxisView*> added;

	for (TrackSelection::const_iterator i = t.begin(); i != t.end(); ++i) {
		if (!contains (*i)) {
			added.push_back (*i);
			push_back (*i);
		}
	}

	return added;
}

bool
TrackSelection::contains (TimeAxisView const * t) const
{
	return find (begin(), end(), t) != end();
}