From c9e37fcc1430a674328069d6a3a5ec7e4284f282 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 22 Jun 2009 01:01:43 +0000 Subject: Option to fit a route group to the editor window. git-svn-id: svn://localhost/ardour2/branches/3.0@5241 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/track_selection.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/track_selection.cc') diff --git a/gtk2_ardour/track_selection.cc b/gtk2_ardour/track_selection.cc index 3e428b1a94..5e29224491 100755 --- a/gtk2_ardour/track_selection.cc +++ b/gtk2_ardour/track_selection.cc @@ -9,7 +9,7 @@ TrackSelection::add (list const & t) list added; for (TrackSelection::const_iterator i = t.begin(); i != t.end(); ++i) { - if (find (begin(), end(), *i) == end()) { + if (!contains (*i)) { added.push_back (*i); push_back (*i); } @@ -17,3 +17,9 @@ TrackSelection::add (list const & t) return added; } + +bool +TrackSelection::contains (TimeAxisView const * t) const +{ + return find (begin(), end(), t) != end(); +} -- cgit v1.2.3