2 Copyright (C) 2002 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <sigc++/bind.h>
23 #include "pbd/error.h"
24 #include "pbd/stacktrace.h"
26 #include "ardour/playlist.h"
27 #include "ardour/rc_configuration.h"
29 #include "gui_thread.h"
30 #include "midi_cut_buffer.h"
31 #include "region_view.h"
32 #include "selection.h"
33 #include "selection_templates.h"
34 #include "time_axis_view.h"
35 #include "automation_time_axis.h"
36 #include "public_editor.h"
37 #include "control_point.h"
42 using namespace ARDOUR;
45 struct AudioRangeComparator {
46 bool operator()(AudioRange a, AudioRange b) {
47 return a.start < b.start;
51 Selection::Selection (const PublicEditor* e)
55 , _no_tracks_changed (false)
59 /* we have disambiguate which remove() for the compiler */
61 void (Selection::*track_remove)(TimeAxisView*) = &Selection::remove;
62 TimeAxisView::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (track_remove, this, _1), gui_context());
64 void (Selection::*marker_remove)(Marker*) = &Selection::remove;
65 Marker::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (marker_remove, this, _1), gui_context());
67 void (Selection::*point_remove)(ControlPoint*) = &Selection::remove;
68 ControlPoint::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (point_remove, this, _1), gui_context());
73 Selection::operator= (const Selection& other)
76 regions = other.regions;
77 tracks = other.tracks;
80 midi_regions = other.midi_regions;
81 midi_notes = other.midi_notes;
88 operator== (const Selection& a, const Selection& b)
90 return a.regions == b.regions &&
91 a.tracks == b.tracks &&
94 a.playlists == b.playlists &&
95 a.midi_notes == b.midi_notes &&
96 a.midi_regions == b.midi_regions;
99 /** Clear everything from the Selection */
110 clear_midi_regions ();
115 Selection::clear_objects ()
122 clear_midi_regions ();
126 Selection::clear_tracks ()
128 if (!tracks.empty()) {
129 for (TrackViewList::iterator x = tracks.begin(); x != tracks.end(); ++x) {
130 (*x)->set_selected (false);
133 if (!_no_tracks_changed) {
140 Selection::clear_time ()
148 Selection::dump_region_layers()
150 cerr << "region selection layer dump" << endl;
151 for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
152 cerr << "layer: " << (int)(*i)->region()->layer() << endl;
158 Selection::clear_regions ()
160 if (!regions.empty()) {
161 regions.clear_all ();
163 if (Config->get_link_region_and_track_selection()) {
170 Selection::clear_midi_notes ()
172 if (!midi_notes.empty()) {
173 for (MidiNoteSelection::iterator x = midi_notes.begin(); x != midi_notes.end(); ++x) {
182 Selection::clear_midi_regions ()
184 if (!midi_regions.empty()) {
185 midi_regions.clear ();
186 MidiRegionsChanged ();
191 Selection::clear_playlists ()
193 /* Selections own their playlists */
195 for (PlaylistSelection::iterator i = playlists.begin(); i != playlists.end(); ++i) {
196 /* selections own their own regions, which are copies of the "originals". make them go away */
197 (*i)->drop_regions ();
201 if (!playlists.empty()) {
208 Selection::clear_lines ()
210 if (!lines.empty()) {
217 Selection::clear_markers ()
219 if (!markers.empty()) {
226 Selection::toggle (boost::shared_ptr<Playlist> pl)
228 clear_time(); //enforce object/range exclusivity
230 PlaylistSelection::iterator i;
232 if ((i = find (playlists.begin(), playlists.end(), pl)) == playlists.end()) {
234 playlists.push_back(pl);
243 Selection::toggle (const TrackViewList& track_list)
245 for (TrackViewList::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
251 Selection::toggle (TimeAxisView* track)
253 TrackSelection::iterator i;
255 if ((i = find (tracks.begin(), tracks.end(), track)) == tracks.end()) {
256 track->set_selected (true);
257 tracks.push_back (track);
259 track->set_selected (false);
263 if (!_no_tracks_changed) {
269 Selection::toggle (const MidiNoteSelection& midi_note_list)
271 clear_time(); //enforce object/range exclusivity
273 for (MidiNoteSelection::const_iterator i = midi_note_list.begin(); i != midi_note_list.end(); ++i) {
279 Selection::toggle (MidiCutBuffer* midi)
281 MidiNoteSelection::iterator i;
283 if ((i = find (midi_notes.begin(), midi_notes.end(), midi)) == midi_notes.end()) {
284 midi_notes.push_back (midi);
286 /* remember that we own the MCB */
288 midi_notes.erase (i);
296 Selection::toggle (RegionView* r)
298 clear_time(); //enforce object/range exclusivity
300 RegionSelection::iterator i;
302 if ((i = find (regions.begin(), regions.end(), r)) == regions.end()) {
312 Selection::toggle (MidiRegionView* mrv)
314 clear_time(); //enforce object/range exclusivity
316 MidiRegionSelection::iterator i;
318 if ((i = find (midi_regions.begin(), midi_regions.end(), mrv)) == midi_regions.end()) {
321 midi_regions.erase (i);
324 MidiRegionsChanged ();
328 Selection::toggle (vector<RegionView*>& r)
330 clear_time(); //enforce object/range exclusivity
332 RegionSelection::iterator i;
334 for (vector<RegionView*>::iterator x = r.begin(); x != r.end(); ++x) {
335 if ((i = find (regions.begin(), regions.end(), (*x))) == regions.end()) {
346 Selection::toggle (framepos_t start, framepos_t end)
348 clear_objects(); //enforce object/range exclusivity
350 AudioRangeComparator cmp;
352 /* XXX this implementation is incorrect */
354 time.push_back (AudioRange (start, end, ++next_time_id));
364 Selection::add (boost::shared_ptr<Playlist> pl)
366 clear_time(); //enforce object/range exclusivity
368 if (find (playlists.begin(), playlists.end(), pl) == playlists.end()) {
370 playlists.push_back(pl);
376 Selection::add (const list<boost::shared_ptr<Playlist> >& pllist)
378 clear_time(); //enforce object/range exclusivity
380 bool changed = false;
382 for (list<boost::shared_ptr<Playlist> >::const_iterator i = pllist.begin(); i != pllist.end(); ++i) {
383 if (find (playlists.begin(), playlists.end(), (*i)) == playlists.end()) {
385 playlists.push_back (*i);
396 Selection::add (const TrackViewList& track_list)
398 TrackViewList added = tracks.add (track_list);
400 if (!added.empty()) {
401 for (TrackViewList::iterator x = added.begin(); x != added.end(); ++x) {
402 (*x)->set_selected (true);
404 if (!_no_tracks_changed) {
411 Selection::add (TimeAxisView* track)
414 track->set_selected (true);
415 tr.push_back (track);
420 Selection::add (const MidiNoteSelection& midi_list)
422 clear_time(); //enforce object/range exclusivity
424 const MidiNoteSelection::const_iterator b = midi_list.begin();
425 const MidiNoteSelection::const_iterator e = midi_list.end();
427 if (!midi_list.empty()) {
428 midi_notes.insert (midi_notes.end(), b, e);
434 Selection::add (MidiCutBuffer* midi)
436 /* we take ownership of the MCB */
438 if (find (midi_notes.begin(), midi_notes.end(), midi) == midi_notes.end()) {
439 midi_notes.push_back (midi);
445 Selection::add (vector<RegionView*>& v)
447 clear_time(); //enforce object/range exclusivity
449 /* XXX This method or the add (const RegionSelection&) needs to go
452 bool changed = false;
454 for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) {
455 if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
456 changed = regions.add ((*i));
457 if (Config->get_link_region_and_track_selection() && changed) {
458 add (&(*i)->get_time_axis_view());
469 Selection::add (const RegionSelection& rs)
471 clear_time(); //enforce object/range exclusivity
473 /* XXX This method or the add (const vector<RegionView*>&) needs to go
476 bool changed = false;
478 for (RegionSelection::const_iterator i = rs.begin(); i != rs.end(); ++i) {
479 if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
480 changed = regions.add ((*i));
481 if (Config->get_link_region_and_track_selection() && changed) {
482 add (&(*i)->get_time_axis_view());
493 Selection::add (RegionView* r)
495 clear_time(); //enforce object/range exclusivity
497 if (find (regions.begin(), regions.end(), r) == regions.end()) {
498 bool changed = regions.add (r);
499 if (Config->get_link_region_and_track_selection() && changed) {
500 add (&r->get_time_axis_view());
509 Selection::add (MidiRegionView* mrv)
511 clear_time(); //enforce object/range exclusivity
513 if (find (midi_regions.begin(), midi_regions.end(), mrv) == midi_regions.end()) {
514 midi_regions.push_back (mrv);
515 /* XXX should we do this? */
517 if (Config->get_link_region_and_track_selection()) {
518 add (&mrv->get_time_axis_view());
521 MidiRegionsChanged ();
526 Selection::add (framepos_t start, framepos_t end)
528 clear_objects(); //enforce object/range exclusivity
530 AudioRangeComparator cmp;
532 /* XXX this implementation is incorrect */
534 time.push_back (AudioRange (start, end, ++next_time_id));
544 Selection::move_time (framecnt_t distance)
550 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
551 (*i).start += distance;
552 (*i).end += distance;
559 Selection::replace (uint32_t sid, framepos_t start, framepos_t end)
561 clear_objects(); //enforce object/range exclusivity
563 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
564 if ((*i).id == sid) {
566 time.push_back (AudioRange(start,end, sid));
568 /* don't consolidate here */
571 AudioRangeComparator cmp;
581 Selection::add (boost::shared_ptr<Evoral::ControlList> cl)
583 clear_time(); //enforce object/range exclusivity
585 boost::shared_ptr<ARDOUR::AutomationList> al
586 = boost::dynamic_pointer_cast<ARDOUR::AutomationList>(cl);
588 warning << "Programming error: Selected list is not an ARDOUR::AutomationList" << endmsg;
591 if (find (lines.begin(), lines.end(), al) == lines.end()) {
592 lines.push_back (al);
598 Selection::remove (TimeAxisView* track)
600 list<TimeAxisView*>::iterator i;
601 if ((i = find (tracks.begin(), tracks.end(), track)) != tracks.end()) {
602 track->set_selected (false);
604 if (!_no_tracks_changed) {
611 Selection::remove (const TrackViewList& track_list)
613 bool changed = false;
615 for (TrackViewList::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
617 TrackViewList::iterator x = find (tracks.begin(), tracks.end(), *i);
618 if (x != tracks.end()) {
619 (*i)->set_selected (false);
626 if (!_no_tracks_changed) {
633 Selection::remove (ControlPoint* p)
635 PointSelection::iterator i = find (points.begin(), points.end(), p);
636 if (i != points.end ()) {
642 Selection::remove (const MidiNoteSelection& midi_list)
644 bool changed = false;
646 for (MidiNoteSelection::const_iterator i = midi_list.begin(); i != midi_list.end(); ++i) {
648 MidiNoteSelection::iterator x;
650 if ((x = find (midi_notes.begin(), midi_notes.end(), (*i))) != midi_notes.end()) {
651 midi_notes.erase (x);
662 Selection::remove (MidiCutBuffer* midi)
664 MidiNoteSelection::iterator x;
666 if ((x = find (midi_notes.begin(), midi_notes.end(), midi)) != midi_notes.end()) {
667 /* remember that we own the MCB */
669 midi_notes.erase (x);
675 Selection::remove (boost::shared_ptr<Playlist> track)
677 list<boost::shared_ptr<Playlist> >::iterator i;
678 if ((i = find (playlists.begin(), playlists.end(), track)) != playlists.end()) {
685 Selection::remove (const list<boost::shared_ptr<Playlist> >& pllist)
687 bool changed = false;
689 for (list<boost::shared_ptr<Playlist> >::const_iterator i = pllist.begin(); i != pllist.end(); ++i) {
691 list<boost::shared_ptr<Playlist> >::iterator x;
693 if ((x = find (playlists.begin(), playlists.end(), (*i))) != playlists.end()) {
705 Selection::remove (RegionView* r)
707 if (regions.remove (r)) {
711 if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) {
712 remove (&r->get_time_axis_view());
717 Selection::remove (MidiRegionView* mrv)
719 MidiRegionSelection::iterator x;
721 if ((x = find (midi_regions.begin(), midi_regions.end(), mrv)) != midi_regions.end()) {
722 midi_regions.erase (x);
723 MidiRegionsChanged ();
727 /* XXX fix this up ? */
728 if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) {
729 remove (&r->get_time_axis_view());
736 Selection::remove (uint32_t selection_id)
742 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
743 if ((*i).id == selection_id) {
753 Selection::remove (framepos_t /*start*/, framepos_t /*end*/)
758 Selection::remove (boost::shared_ptr<ARDOUR::AutomationList> ac)
760 AutomationSelection::iterator i;
761 if ((i = find (lines.begin(), lines.end(), ac)) != lines.end()) {
768 Selection::set (TimeAxisView* track)
775 Selection::set (const TrackViewList& track_list)
782 Selection::set (const MidiNoteSelection& midi_list)
784 clear_time (); //enforce region/object exclusivity
790 Selection::set (boost::shared_ptr<Playlist> playlist)
792 clear_time (); //enforce region/object exclusivity
798 Selection::set (const list<boost::shared_ptr<Playlist> >& pllist)
800 clear_time(); //enforce region/object exclusivity
806 Selection::set (const RegionSelection& rs)
808 clear_time(); //enforce region/object exclusivity
811 RegionsChanged(); /* EMIT SIGNAL */
815 Selection::set (MidiRegionView* mrv)
817 clear_time(); //enforce region/object exclusivity
823 Selection::set (RegionView* r, bool also_clear_tracks)
825 clear_time(); //enforce region/object exclusivity
827 if (also_clear_tracks && !Config->get_link_region_and_track_selection()) {
828 /* clear_regions() will have done this if the link preference
837 Selection::set (vector<RegionView*>& v)
839 bool had_regions = !regions.empty();
841 clear_time(); //enforce region/object exclusivity
844 if (Config->get_link_region_and_track_selection()) {
846 /* there were regions before, so we're changing the
847 * region selection (likely), thus link region/track
848 * selection. relevant tracks will get selected
849 * as we ::add() below.
852 // make sure to deselect any automation selections
859 /** Set the start and end time of the time selection, without changing
860 * the list of tracks it applies to.
863 Selection::set (framepos_t start, framepos_t end)
865 clear_objects(); //enforce region/object exclusivity
868 if ((start == 0 && end == 0) || end < start) {
873 time.push_back (AudioRange (start, end, ++next_time_id));
875 /* reuse the first entry, and remove all the rest */
877 while (time.size() > 1) {
880 time.front().start = start;
881 time.front().end = end;
888 return time.front().id;
891 /** Set the start and end of the range selection. If more than one range
892 * is currently selected, the start of the earliest range and the end of the
893 * latest range are set. If no range is currently selected, this method
894 * selects a single range from start to end.
896 * @param start New start time.
897 * @param end New end time.
900 Selection::set_preserving_all_ranges (framepos_t start, framepos_t end)
902 clear_objects(); //enforce region/object exclusivity
904 if ((start == 0 && end == 0) || (end < start)) {
909 time.push_back (AudioRange (start, end, ++next_time_id));
911 time.sort (AudioRangeComparator ());
912 time.front().start = start;
913 time.back().end = end;
922 Selection::set (boost::shared_ptr<Evoral::ControlList> ac)
924 clear_time(); //enforce region/object exclusivity
931 Selection::selected (Marker* m)
933 return find (markers.begin(), markers.end(), m) != markers.end();
937 Selection::selected (TimeAxisView* tv)
939 return tv->get_selected ();
943 Selection::selected (RegionView* rv)
945 return find (regions.begin(), regions.end(), rv) != regions.end();
949 Selection::selected (ControlPoint* cp)
951 return find (points.begin(), points.end(), cp) != points.end();
955 Selection::empty (bool internal_selection)
957 bool object_level_empty = regions.empty () &&
960 playlists.empty () &&
963 playlists.empty () &&
968 if (!internal_selection) {
969 return object_level_empty;
972 /* this is intended to really only apply when using a Selection
976 return object_level_empty && midi_notes.empty();
980 Selection::toggle (ControlPoint* cp)
982 clear_time(); //enforce region/object exclusivity
984 cp->set_selected (!cp->get_selected ());
985 PointSelection::iterator i = find (points.begin(), points.end(), cp);
986 if (i == points.end()) {
987 points.push_back (cp);
992 PointsChanged (); /* EMIT SIGNAL */
996 Selection::toggle (vector<ControlPoint*> const & cps)
998 clear_time(); //enforce region/object exclusivity
1000 for (vector<ControlPoint*>::const_iterator i = cps.begin(); i != cps.end(); ++i) {
1006 Selection::toggle (list<Selectable*> const & selectables)
1008 clear_time(); //enforce region/object exclusivity
1012 vector<RegionView*> rvs;
1013 vector<ControlPoint*> cps;
1015 for (std::list<Selectable*>::const_iterator i = selectables.begin(); i != selectables.end(); ++i) {
1016 if ((rv = dynamic_cast<RegionView*> (*i)) != 0) {
1018 } else if ((cp = dynamic_cast<ControlPoint*> (*i)) != 0) {
1021 fatal << _("programming error: ")
1022 << X_("unknown selectable type passed to Selection::toggle()")
1038 Selection::set (list<Selectable*> const & selectables)
1040 clear_time (); //enforce region/object exclusivity
1043 if (Config->get_link_region_and_track_selection ()) {
1051 Selection::add (PointSelection const & s)
1053 clear_time (); //enforce region/object exclusivity
1055 for (PointSelection::const_iterator i = s.begin(); i != s.end(); ++i) {
1056 points.push_back (*i);
1061 Selection::add (list<Selectable*> const & selectables)
1063 clear_time (); //enforce region/object exclusivity
1067 vector<RegionView*> rvs;
1068 vector<ControlPoint*> cps;
1070 for (std::list<Selectable*>::const_iterator i = selectables.begin(); i != selectables.end(); ++i) {
1071 if ((rv = dynamic_cast<RegionView*> (*i)) != 0) {
1073 } else if ((cp = dynamic_cast<ControlPoint*> (*i)) != 0) {
1076 fatal << _("programming error: ")
1077 << X_("unknown selectable type passed to Selection::add()")
1093 Selection::clear_points ()
1095 if (!points.empty()) {
1102 Selection::add (ControlPoint* cp)
1104 clear_time (); //enforce region/object exclusivity
1106 cp->set_selected (true);
1107 points.push_back (cp);
1108 PointsChanged (); /* EMIT SIGNAL */
1112 Selection::add (vector<ControlPoint*> const & cps)
1114 clear_time (); //enforce region/object exclusivity
1116 for (vector<ControlPoint*>::const_iterator i = cps.begin(); i != cps.end(); ++i) {
1117 (*i)->set_selected (true);
1118 points.push_back (*i);
1120 PointsChanged (); /* EMIT SIGNAL */
1124 Selection::set (ControlPoint* cp)
1126 clear_time (); //enforce region/object exclusivity
1128 if (cp->get_selected()) {
1132 for (uint32_t i = 0; i < cp->line().npoints(); ++i) {
1133 cp->line().nth (i)->set_selected (false);
1141 Selection::set (Marker* m)
1143 clear_time (); //enforce region/object exclusivity
1150 Selection::toggle (Marker* m)
1152 MarkerSelection::iterator i;
1154 if ((i = find (markers.begin(), markers.end(), m)) == markers.end()) {
1162 Selection::remove (Marker* m)
1164 MarkerSelection::iterator i;
1166 if ((i = find (markers.begin(), markers.end(), m)) != markers.end()) {
1173 Selection::add (Marker* m)
1175 clear_time (); //enforce region/object exclusivity
1177 if (find (markers.begin(), markers.end(), m) == markers.end()) {
1178 markers.push_back (m);
1184 Selection::add (const list<Marker*>& m)
1186 clear_time (); //enforce region/object exclusivity
1188 markers.insert (markers.end(), m.begin(), m.end());
1196 MarkerSelection::range (framepos_t& s, framepos_t& e)
1201 for (MarkerSelection::iterator i = begin(); i != end(); ++i) {
1203 if ((*i)->position() < s) {
1204 s = (*i)->position();
1207 if ((*i)->position() > e) {
1208 e = (*i)->position();
1212 s = std::min (s, e);
1213 e = std::max (s, e);
1217 Selection::get_state () const
1219 /* XXX: not complete; just sufficient to get track selection state
1220 so that re-opening plugin windows for editor mixer strips works
1223 XMLNode* node = new XMLNode (X_("Selection"));
1225 for (TrackSelection::const_iterator i = tracks.begin(); i != tracks.end(); ++i) {
1226 RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
1227 AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (*i);
1229 XMLNode* t = node->add_child (X_("RouteView"));
1230 t->add_property (X_("id"), atoi (rtv->route()->id().to_s().c_str()));
1232 XMLNode* t = node->add_child (X_("AutomationView"));
1233 t->add_property (X_("id"), atoi (atv->parent_route()->id().to_s().c_str()));
1234 t->add_property (X_("parameter"), EventTypeMap::instance().to_symbol (atv->parameter ()));
1238 for (MarkerSelection::const_iterator i = markers.begin(); i != markers.end(); ++i) {
1239 XMLNode* t = node->add_child (X_("Marker"));
1242 Location* loc = editor->find_location_from_marker (*i, is_start);
1244 t->add_property (X_("id"), atoi (loc->id().to_s().c_str()));
1245 t->add_property (X_("start"), is_start ? X_("yes") : X_("no"));
1252 Selection::set_state (XMLNode const & node, int)
1254 if (node.name() != X_("Selection")) {
1258 XMLNodeList children = node.children ();
1259 for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
1260 if ((*i)->name() == X_("RouteView")) {
1262 XMLProperty* prop_id = (*i)->property (X_("id"));
1264 PBD::ID id (prop_id->value ());
1265 RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
1270 } else if ((*i)->name() == X_("AutomationView")) {
1272 XMLProperty* prop_id = (*i)->property (X_("id"));
1273 XMLProperty* prop_parameter = (*i)->property (X_("parameter"));
1276 assert (prop_parameter);
1278 PBD::ID id (prop_id->value ());
1279 RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
1282 boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().new_parameter (prop_parameter->value ()));
1284 /* the automation could be for an entity that was never saved
1285 in the session file. Don't freak out if we can't find
1294 } else if ((*i)->name() == X_("Marker")) {
1296 XMLProperty* prop_id = (*i)->property (X_("id"));
1297 XMLProperty* prop_start = (*i)->property (X_("start"));
1299 assert (prop_start);
1301 PBD::ID id (prop_id->value ());
1302 Marker* m = editor->find_marker_from_location_id (id, string_is_affirmative (prop_start->value ()));
1315 Selection::remove_regions (TimeAxisView* t)
1317 RegionSelection::iterator i = regions.begin();
1318 while (i != regions.end ()) {
1319 RegionSelection::iterator tmp = i;
1322 if (&(*i)->get_time_axis_view() == t) {
1331 Selection::block_tracks_changed (bool yn)
1333 _no_tracks_changed = yn;