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 ();
167 Selection::clear_midi_notes ()
169 if (!midi_notes.empty()) {
170 for (MidiNoteSelection::iterator x = midi_notes.begin(); x != midi_notes.end(); ++x) {
179 Selection::clear_midi_regions ()
181 if (!midi_regions.empty()) {
182 midi_regions.clear ();
183 MidiRegionsChanged ();
188 Selection::clear_playlists ()
190 /* Selections own their playlists */
192 for (PlaylistSelection::iterator i = playlists.begin(); i != playlists.end(); ++i) {
193 /* selections own their own regions, which are copies of the "originals". make them go away */
194 (*i)->drop_regions ();
198 if (!playlists.empty()) {
205 Selection::clear_lines ()
207 if (!lines.empty()) {
214 Selection::clear_markers ()
216 if (!markers.empty()) {
223 Selection::toggle (boost::shared_ptr<Playlist> pl)
225 clear_time(); //enforce object/range exclusivity
226 clear_tracks(); //enforce object/track exclusivity
228 PlaylistSelection::iterator i;
230 if ((i = find (playlists.begin(), playlists.end(), pl)) == playlists.end()) {
232 playlists.push_back(pl);
241 Selection::toggle (const TrackViewList& track_list)
243 for (TrackViewList::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
249 Selection::toggle (TimeAxisView* track)
251 TrackSelection::iterator i;
253 if ((i = find (tracks.begin(), tracks.end(), track)) == tracks.end()) {
254 track->set_selected (true);
255 tracks.push_back (track);
257 track->set_selected (false);
261 if (!_no_tracks_changed) {
267 Selection::toggle (const MidiNoteSelection& midi_note_list)
269 clear_time(); //enforce object/range exclusivity
270 clear_tracks(); //enforce object/track exclusivity
272 for (MidiNoteSelection::const_iterator i = midi_note_list.begin(); i != midi_note_list.end(); ++i) {
278 Selection::toggle (MidiCutBuffer* midi)
280 MidiNoteSelection::iterator i;
282 if ((i = find (midi_notes.begin(), midi_notes.end(), midi)) == midi_notes.end()) {
283 midi_notes.push_back (midi);
285 /* remember that we own the MCB */
287 midi_notes.erase (i);
295 Selection::toggle (RegionView* r)
297 clear_time(); //enforce object/range exclusivity
298 clear_tracks(); //enforce object/track 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
315 clear_tracks(); //enforce object/track exclusivity
317 MidiRegionSelection::iterator i;
319 if ((i = find (midi_regions.begin(), midi_regions.end(), mrv)) == midi_regions.end()) {
322 midi_regions.erase (i);
325 MidiRegionsChanged ();
329 Selection::toggle (vector<RegionView*>& r)
331 clear_time(); //enforce object/range exclusivity
332 clear_tracks(); //enforce object/track exclusivity
334 RegionSelection::iterator i;
336 for (vector<RegionView*>::iterator x = r.begin(); x != r.end(); ++x) {
337 if ((i = find (regions.begin(), regions.end(), (*x))) == regions.end()) {
348 Selection::toggle (framepos_t start, framepos_t end)
350 clear_objects(); //enforce object/range exclusivity
352 AudioRangeComparator cmp;
354 /* XXX this implementation is incorrect */
356 time.push_back (AudioRange (start, end, ++next_time_id));
366 Selection::add (boost::shared_ptr<Playlist> pl)
368 clear_time(); //enforce object/range exclusivity
369 clear_tracks(); //enforce object/track exclusivity
371 if (find (playlists.begin(), playlists.end(), pl) == playlists.end()) {
373 playlists.push_back(pl);
379 Selection::add (const list<boost::shared_ptr<Playlist> >& pllist)
381 clear_time(); //enforce object/range exclusivity
382 clear_tracks(); //enforce object/track exclusivity
384 bool changed = false;
386 for (list<boost::shared_ptr<Playlist> >::const_iterator i = pllist.begin(); i != pllist.end(); ++i) {
387 if (find (playlists.begin(), playlists.end(), (*i)) == playlists.end()) {
389 playlists.push_back (*i);
400 Selection::add (const TrackViewList& track_list)
402 clear_objects(); //enforce object/range exclusivity
404 TrackViewList added = tracks.add (track_list);
406 if (!added.empty()) {
407 for (TrackViewList::iterator x = added.begin(); x != added.end(); ++x) {
408 (*x)->set_selected (true);
410 if (!_no_tracks_changed) {
417 Selection::add (TimeAxisView* track)
419 clear_objects(); //enforce object/range exclusivity
422 track->set_selected (true);
423 tr.push_back (track);
428 Selection::add (const MidiNoteSelection& midi_list)
430 clear_time(); //enforce object/range exclusivity
431 clear_tracks(); //enforce object/track exclusivity
433 const MidiNoteSelection::const_iterator b = midi_list.begin();
434 const MidiNoteSelection::const_iterator e = midi_list.end();
436 if (!midi_list.empty()) {
437 midi_notes.insert (midi_notes.end(), b, e);
443 Selection::add (MidiCutBuffer* midi)
445 /* we take ownership of the MCB */
447 if (find (midi_notes.begin(), midi_notes.end(), midi) == midi_notes.end()) {
448 midi_notes.push_back (midi);
454 Selection::add (vector<RegionView*>& v)
456 clear_time(); //enforce object/range exclusivity
457 clear_tracks(); //enforce object/track exclusivity
459 /* XXX This method or the add (const RegionSelection&) needs to go
462 bool changed = false;
464 for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) {
465 if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
466 changed = regions.add ((*i));
476 Selection::add (const RegionSelection& rs)
478 clear_time(); //enforce object/range exclusivity
479 clear_tracks(); //enforce object/track exclusivity
481 /* XXX This method or the add (const vector<RegionView*>&) needs to go
484 bool changed = false;
486 for (RegionSelection::const_iterator i = rs.begin(); i != rs.end(); ++i) {
487 if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
488 changed = regions.add ((*i));
498 Selection::add (RegionView* r)
500 clear_time(); //enforce object/range exclusivity
501 clear_tracks(); //enforce object/track exclusivity
503 if (find (regions.begin(), regions.end(), r) == regions.end()) {
504 bool changed = regions.add (r);
512 Selection::add (MidiRegionView* mrv)
514 clear_time(); //enforce object/range exclusivity
515 clear_tracks(); //enforce object/track exclusivity
517 if (find (midi_regions.begin(), midi_regions.end(), mrv) == midi_regions.end()) {
518 midi_regions.push_back (mrv);
519 /* XXX should we do this? */
520 MidiRegionsChanged ();
525 Selection::add (framepos_t start, framepos_t end)
527 clear_objects(); //enforce object/range exclusivity
529 AudioRangeComparator cmp;
531 /* XXX this implementation is incorrect */
533 time.push_back (AudioRange (start, end, ++next_time_id));
543 Selection::move_time (framecnt_t distance)
549 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
550 (*i).start += distance;
551 (*i).end += distance;
558 Selection::replace (uint32_t sid, framepos_t start, framepos_t end)
560 clear_objects(); //enforce object/range exclusivity
562 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
563 if ((*i).id == sid) {
565 time.push_back (AudioRange(start,end, sid));
567 /* don't consolidate here */
570 AudioRangeComparator cmp;
580 Selection::add (boost::shared_ptr<Evoral::ControlList> cl)
582 clear_time(); //enforce object/range exclusivity
583 clear_tracks(); //enforce object/track 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)) {
713 Selection::remove (MidiRegionView* mrv)
715 MidiRegionSelection::iterator x;
717 if ((x = find (midi_regions.begin(), midi_regions.end(), mrv)) != midi_regions.end()) {
718 midi_regions.erase (x);
719 MidiRegionsChanged ();
725 Selection::remove (uint32_t selection_id)
731 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
732 if ((*i).id == selection_id) {
742 Selection::remove (framepos_t /*start*/, framepos_t /*end*/)
747 Selection::remove (boost::shared_ptr<ARDOUR::AutomationList> ac)
749 AutomationSelection::iterator i;
750 if ((i = find (lines.begin(), lines.end(), ac)) != lines.end()) {
757 Selection::set (TimeAxisView* track)
759 clear_objects(); //enforce object/range exclusivity
765 Selection::set (const TrackViewList& track_list)
767 clear_objects(); //enforce object/range exclusivity
773 Selection::set (const MidiNoteSelection& midi_list)
775 clear_time (); //enforce region/object exclusivity
776 clear_tracks(); //enforce object/track exclusivity
782 Selection::set (boost::shared_ptr<Playlist> playlist)
784 clear_time (); //enforce region/object exclusivity
785 clear_tracks(); //enforce object/track exclusivity
791 Selection::set (const list<boost::shared_ptr<Playlist> >& pllist)
793 clear_time(); //enforce region/object exclusivity
799 Selection::set (const RegionSelection& rs)
801 clear_time(); //enforce region/object exclusivity
802 clear_tracks(); //enforce object/track exclusivity
805 RegionsChanged(); /* EMIT SIGNAL */
809 Selection::set (MidiRegionView* mrv)
811 clear_time(); //enforce region/object exclusivity
812 clear_tracks(); //enforce object/track exclusivity
818 Selection::set (RegionView* r, bool /*also_clear_tracks*/)
820 clear_time(); //enforce region/object exclusivity
821 clear_tracks(); //enforce object/track exclusivity
827 Selection::set (vector<RegionView*>& v)
829 clear_time(); //enforce region/object exclusivity
830 clear_tracks(); //enforce object/track exclusivity
836 /** Set the start and end time of the time selection, without changing
837 * the list of tracks it applies to.
840 Selection::set (framepos_t start, framepos_t end)
842 clear_objects(); //enforce region/object exclusivity
845 if ((start == 0 && end == 0) || end < start) {
850 time.push_back (AudioRange (start, end, ++next_time_id));
852 /* reuse the first entry, and remove all the rest */
854 while (time.size() > 1) {
857 time.front().start = start;
858 time.front().end = end;
865 return time.front().id;
868 /** Set the start and end of the range selection. If more than one range
869 * is currently selected, the start of the earliest range and the end of the
870 * latest range are set. If no range is currently selected, this method
871 * selects a single range from start to end.
873 * @param start New start time.
874 * @param end New end time.
877 Selection::set_preserving_all_ranges (framepos_t start, framepos_t end)
879 clear_objects(); //enforce region/object exclusivity
881 if ((start == 0 && end == 0) || (end < start)) {
886 time.push_back (AudioRange (start, end, ++next_time_id));
888 time.sort (AudioRangeComparator ());
889 time.front().start = start;
890 time.back().end = end;
899 Selection::set (boost::shared_ptr<Evoral::ControlList> ac)
901 clear_time(); //enforce region/object exclusivity
902 clear_tracks(); //enforce object/track exclusivity
909 Selection::selected (Marker* m)
911 return find (markers.begin(), markers.end(), m) != markers.end();
915 Selection::selected (TimeAxisView* tv)
917 return tv->get_selected ();
921 Selection::selected (RegionView* rv)
923 return find (regions.begin(), regions.end(), rv) != regions.end();
927 Selection::selected (ControlPoint* cp)
929 return find (points.begin(), points.end(), cp) != points.end();
933 Selection::empty (bool internal_selection)
935 bool object_level_empty = regions.empty () &&
938 playlists.empty () &&
941 playlists.empty () &&
946 if (!internal_selection) {
947 return object_level_empty;
950 /* this is intended to really only apply when using a Selection
954 return object_level_empty && midi_notes.empty();
958 Selection::toggle (ControlPoint* cp)
960 clear_time(); //enforce region/object exclusivity
961 clear_tracks(); //enforce object/track exclusivity
963 cp->set_selected (!cp->get_selected ());
964 PointSelection::iterator i = find (points.begin(), points.end(), cp);
965 if (i == points.end()) {
966 points.push_back (cp);
971 PointsChanged (); /* EMIT SIGNAL */
975 Selection::toggle (vector<ControlPoint*> const & cps)
977 clear_time(); //enforce region/object exclusivity
978 clear_tracks(); //enforce object/track exclusivity
980 for (vector<ControlPoint*>::const_iterator i = cps.begin(); i != cps.end(); ++i) {
986 Selection::toggle (list<Selectable*> const & selectables)
988 clear_time(); //enforce region/object exclusivity
989 clear_tracks(); //enforce object/track exclusivity
993 vector<RegionView*> rvs;
994 vector<ControlPoint*> cps;
996 for (std::list<Selectable*>::const_iterator i = selectables.begin(); i != selectables.end(); ++i) {
997 if ((rv = dynamic_cast<RegionView*> (*i)) != 0) {
999 } else if ((cp = dynamic_cast<ControlPoint*> (*i)) != 0) {
1002 fatal << _("programming error: ")
1003 << X_("unknown selectable type passed to Selection::toggle()")
1005 abort(); /*NOTREACHED*/
1019 Selection::set (list<Selectable*> const & selectables)
1021 clear_time (); //enforce region/object exclusivity
1022 clear_tracks(); //enforce object/track exclusivity
1029 Selection::add (PointSelection const & s)
1031 clear_time (); //enforce region/object exclusivity
1032 clear_tracks(); //enforce object/track exclusivity
1034 for (PointSelection::const_iterator i = s.begin(); i != s.end(); ++i) {
1035 points.push_back (*i);
1040 Selection::add (list<Selectable*> const & selectables)
1042 clear_time (); //enforce region/object exclusivity
1043 clear_tracks(); //enforce object/track exclusivity
1047 vector<RegionView*> rvs;
1048 vector<ControlPoint*> cps;
1050 for (std::list<Selectable*>::const_iterator i = selectables.begin(); i != selectables.end(); ++i) {
1051 if ((rv = dynamic_cast<RegionView*> (*i)) != 0) {
1053 } else if ((cp = dynamic_cast<ControlPoint*> (*i)) != 0) {
1056 fatal << _("programming error: ")
1057 << X_("unknown selectable type passed to Selection::add()")
1059 abort(); /*NOTREACHED*/
1073 Selection::clear_points ()
1075 if (!points.empty()) {
1082 Selection::add (ControlPoint* cp)
1084 clear_time (); //enforce region/object exclusivity
1085 clear_tracks(); //enforce object/track exclusivity
1087 cp->set_selected (true);
1088 points.push_back (cp);
1089 PointsChanged (); /* EMIT SIGNAL */
1093 Selection::add (vector<ControlPoint*> const & cps)
1095 clear_time (); //enforce region/object exclusivity
1096 clear_tracks(); //enforce object/track exclusivity
1098 for (vector<ControlPoint*>::const_iterator i = cps.begin(); i != cps.end(); ++i) {
1099 (*i)->set_selected (true);
1100 points.push_back (*i);
1102 PointsChanged (); /* EMIT SIGNAL */
1106 Selection::set (ControlPoint* cp)
1108 clear_time (); //enforce region/object exclusivity
1109 clear_tracks(); //enforce object/track exclusivity
1111 if (cp->get_selected()) {
1115 for (uint32_t i = 0; i < cp->line().npoints(); ++i) {
1116 cp->line().nth (i)->set_selected (false);
1124 Selection::set (Marker* m)
1126 clear_time (); //enforce region/object exclusivity
1127 clear_tracks(); //enforce object/track exclusivity
1134 Selection::toggle (Marker* m)
1136 MarkerSelection::iterator i;
1138 if ((i = find (markers.begin(), markers.end(), m)) == markers.end()) {
1146 Selection::remove (Marker* m)
1148 MarkerSelection::iterator i;
1150 if ((i = find (markers.begin(), markers.end(), m)) != markers.end()) {
1157 Selection::add (Marker* m)
1159 clear_time (); //enforce region/object exclusivity
1160 clear_tracks(); //enforce object/track exclusivity
1162 if (find (markers.begin(), markers.end(), m) == markers.end()) {
1163 markers.push_back (m);
1169 Selection::add (const list<Marker*>& m)
1171 clear_time (); //enforce region/object exclusivity
1172 clear_tracks(); //enforce object/track exclusivity
1174 markers.insert (markers.end(), m.begin(), m.end());
1182 MarkerSelection::range (framepos_t& s, framepos_t& e)
1187 for (MarkerSelection::iterator i = begin(); i != end(); ++i) {
1189 if ((*i)->position() < s) {
1190 s = (*i)->position();
1193 if ((*i)->position() > e) {
1194 e = (*i)->position();
1198 s = std::min (s, e);
1199 e = std::max (s, e);
1203 Selection::get_state () const
1205 /* XXX: not complete; just sufficient to get track selection state
1206 so that re-opening plugin windows for editor mixer strips works
1209 XMLNode* node = new XMLNode (X_("Selection"));
1211 for (TrackSelection::const_iterator i = tracks.begin(); i != tracks.end(); ++i) {
1212 RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
1213 AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (*i);
1215 XMLNode* t = node->add_child (X_("RouteView"));
1216 t->add_property (X_("id"), atoi (rtv->route()->id().to_s().c_str()));
1218 XMLNode* t = node->add_child (X_("AutomationView"));
1219 t->add_property (X_("id"), atoi (atv->parent_route()->id().to_s().c_str()));
1220 t->add_property (X_("parameter"), EventTypeMap::instance().to_symbol (atv->parameter ()));
1224 for (MarkerSelection::const_iterator i = markers.begin(); i != markers.end(); ++i) {
1225 XMLNode* t = node->add_child (X_("Marker"));
1228 Location* loc = editor->find_location_from_marker (*i, is_start);
1230 t->add_property (X_("id"), atoi (loc->id().to_s().c_str()));
1231 t->add_property (X_("start"), is_start ? X_("yes") : X_("no"));
1238 Selection::set_state (XMLNode const & node, int)
1240 if (node.name() != X_("Selection")) {
1244 XMLNodeList children = node.children ();
1245 for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
1246 if ((*i)->name() == X_("RouteView")) {
1248 XMLProperty* prop_id = (*i)->property (X_("id"));
1250 PBD::ID id (prop_id->value ());
1251 RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
1256 } else if ((*i)->name() == X_("AutomationView")) {
1258 XMLProperty* prop_id = (*i)->property (X_("id"));
1259 XMLProperty* prop_parameter = (*i)->property (X_("parameter"));
1262 assert (prop_parameter);
1264 PBD::ID id (prop_id->value ());
1265 RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
1268 boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().new_parameter (prop_parameter->value ()));
1270 /* the automation could be for an entity that was never saved
1271 in the session file. Don't freak out if we can't find
1280 } else if ((*i)->name() == X_("Marker")) {
1282 XMLProperty* prop_id = (*i)->property (X_("id"));
1283 XMLProperty* prop_start = (*i)->property (X_("start"));
1285 assert (prop_start);
1287 PBD::ID id (prop_id->value ());
1288 Marker* m = editor->find_marker_from_location_id (id, string_is_affirmative (prop_start->value ()));
1301 Selection::remove_regions (TimeAxisView* t)
1303 RegionSelection::iterator i = regions.begin();
1304 while (i != regions.end ()) {
1305 RegionSelection::iterator tmp = i;
1308 if (&(*i)->get_time_axis_view() == t) {
1317 Selection::block_tracks_changed (bool yn)
1319 _no_tracks_changed = yn;