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>
22 #include "pbd/error.h"
23 #include "pbd/stacktrace.h"
25 #include "ardour/playlist.h"
26 #include "ardour/rc_configuration.h"
28 #include "gui_thread.h"
29 #include "midi_cut_buffer.h"
30 #include "region_view.h"
31 #include "selection.h"
32 #include "selection_templates.h"
33 #include "time_axis_view.h"
34 #include "automation_time_axis.h"
35 #include "public_editor.h"
36 #include "control_point.h"
41 using namespace ARDOUR;
44 struct AudioRangeComparator {
45 bool operator()(AudioRange a, AudioRange b) {
46 return a.start < b.start;
50 Selection::Selection (const PublicEditor* e)
54 , _no_tracks_changed (false)
58 /* we have disambiguate which remove() for the compiler */
60 void (Selection::*track_remove)(TimeAxisView*) = &Selection::remove;
61 TimeAxisView::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (track_remove, this, _1), gui_context());
63 void (Selection::*marker_remove)(Marker*) = &Selection::remove;
64 Marker::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (marker_remove, this, _1), gui_context());
66 void (Selection::*point_remove)(ControlPoint*) = &Selection::remove;
67 ControlPoint::CatchDeletion.connect (*this, MISSING_INVALIDATOR, boost::bind (point_remove, this, _1), gui_context());
72 Selection::operator= (const Selection& other)
75 regions = other.regions;
76 tracks = other.tracks;
79 midi_regions = other.midi_regions;
80 midi_notes = other.midi_notes;
87 operator== (const Selection& a, const Selection& b)
89 return a.regions == b.regions &&
90 a.tracks == b.tracks &&
93 a.playlists == b.playlists &&
94 a.midi_notes == b.midi_notes &&
95 a.midi_regions == b.midi_regions;
98 /** Clear everything from the Selection */
109 clear_midi_regions ();
114 Selection::clear_objects ()
121 clear_midi_regions ();
126 Selection::clear_tracks ()
128 if (!tracks.empty()) {
130 if (!_no_tracks_changed) {
137 Selection::clear_time ()
145 Selection::dump_region_layers()
147 cerr << "region selection layer dump" << endl;
148 for (RegionSelection::iterator i = regions.begin(); i != regions.end(); ++i) {
149 cerr << "layer: " << (int)(*i)->region()->layer() << endl;
155 Selection::clear_regions ()
157 if (!regions.empty()) {
158 regions.clear_all ();
160 if (Config->get_link_region_and_track_selection()) {
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
227 PlaylistSelection::iterator i;
229 if ((i = find (playlists.begin(), playlists.end(), pl)) == playlists.end()) {
231 playlists.push_back(pl);
240 Selection::toggle (const TrackViewList& track_list)
242 for (TrackViewList::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
248 Selection::toggle (TimeAxisView* track)
250 TrackSelection::iterator i;
252 if ((i = find (tracks.begin(), tracks.end(), track)) == tracks.end()) {
253 tracks.push_back (track);
258 if (!_no_tracks_changed) {
264 Selection::toggle (const MidiNoteSelection& midi_note_list)
266 clear_time(); //enforce object/range exclusivity
268 for (MidiNoteSelection::const_iterator i = midi_note_list.begin(); i != midi_note_list.end(); ++i) {
274 Selection::toggle (MidiCutBuffer* midi)
276 MidiNoteSelection::iterator i;
278 if ((i = find (midi_notes.begin(), midi_notes.end(), midi)) == midi_notes.end()) {
279 midi_notes.push_back (midi);
281 /* remember that we own the MCB */
283 midi_notes.erase (i);
291 Selection::toggle (RegionView* r)
293 clear_time(); //enforce object/range exclusivity
295 RegionSelection::iterator i;
297 if ((i = find (regions.begin(), regions.end(), r)) == regions.end()) {
307 Selection::toggle (MidiRegionView* mrv)
309 clear_time(); //enforce object/range exclusivity
311 MidiRegionSelection::iterator i;
313 if ((i = find (midi_regions.begin(), midi_regions.end(), mrv)) == midi_regions.end()) {
316 midi_regions.erase (i);
319 MidiRegionsChanged ();
323 Selection::toggle (vector<RegionView*>& r)
325 clear_time(); //enforce object/range exclusivity
327 RegionSelection::iterator i;
329 for (vector<RegionView*>::iterator x = r.begin(); x != r.end(); ++x) {
330 if ((i = find (regions.begin(), regions.end(), (*x))) == regions.end()) {
341 Selection::toggle (framepos_t start, framepos_t end)
343 clear_objects(); //enforce object/range exclusivity
345 AudioRangeComparator cmp;
347 /* XXX this implementation is incorrect */
349 time.push_back (AudioRange (start, end, ++next_time_id));
359 Selection::add (boost::shared_ptr<Playlist> pl)
361 clear_time(); //enforce object/range exclusivity
363 if (find (playlists.begin(), playlists.end(), pl) == playlists.end()) {
365 playlists.push_back(pl);
371 Selection::add (const list<boost::shared_ptr<Playlist> >& pllist)
373 clear_time(); //enforce object/range exclusivity
375 bool changed = false;
377 for (list<boost::shared_ptr<Playlist> >::const_iterator i = pllist.begin(); i != pllist.end(); ++i) {
378 if (find (playlists.begin(), playlists.end(), (*i)) == playlists.end()) {
380 playlists.push_back (*i);
391 Selection::add (const TrackViewList& track_list)
393 TrackViewList added = tracks.add (track_list);
395 if (!added.empty()) {
396 if (!_no_tracks_changed) {
403 Selection::add (TimeAxisView* track)
406 tr.push_back (track);
411 Selection::add (const MidiNoteSelection& midi_list)
413 clear_time(); //enforce object/range exclusivity
415 const MidiNoteSelection::const_iterator b = midi_list.begin();
416 const MidiNoteSelection::const_iterator e = midi_list.end();
418 if (!midi_list.empty()) {
419 midi_notes.insert (midi_notes.end(), b, e);
425 Selection::add (MidiCutBuffer* midi)
427 /* we take ownership of the MCB */
429 if (find (midi_notes.begin(), midi_notes.end(), midi) == midi_notes.end()) {
430 midi_notes.push_back (midi);
436 Selection::add (vector<RegionView*>& v)
438 clear_time(); //enforce object/range exclusivity
440 /* XXX This method or the add (const RegionSelection&) needs to go
443 bool changed = false;
445 for (vector<RegionView*>::iterator i = v.begin(); i != v.end(); ++i) {
446 if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
447 changed = regions.add ((*i));
448 if (Config->get_link_region_and_track_selection() && changed) {
449 add (&(*i)->get_time_axis_view());
460 Selection::add (const RegionSelection& rs)
462 clear_time(); //enforce object/range exclusivity
464 /* XXX This method or the add (const vector<RegionView*>&) needs to go
467 bool changed = false;
469 for (RegionSelection::const_iterator i = rs.begin(); i != rs.end(); ++i) {
470 if (find (regions.begin(), regions.end(), (*i)) == regions.end()) {
471 changed = regions.add ((*i));
472 if (Config->get_link_region_and_track_selection() && changed) {
473 add (&(*i)->get_time_axis_view());
484 Selection::add (RegionView* r)
486 clear_time(); //enforce object/range exclusivity
488 if (find (regions.begin(), regions.end(), r) == regions.end()) {
489 bool changed = regions.add (r);
490 if (Config->get_link_region_and_track_selection() && changed) {
491 add (&r->get_time_axis_view());
500 Selection::add (MidiRegionView* mrv)
502 clear_time(); //enforce object/range exclusivity
504 if (find (midi_regions.begin(), midi_regions.end(), mrv) == midi_regions.end()) {
505 midi_regions.push_back (mrv);
506 /* XXX should we do this? */
508 if (Config->get_link_region_and_track_selection()) {
509 add (&mrv->get_time_axis_view());
512 MidiRegionsChanged ();
517 Selection::add (framepos_t start, framepos_t end)
519 clear_objects(); //enforce object/range exclusivity
521 AudioRangeComparator cmp;
523 /* XXX this implementation is incorrect */
525 time.push_back (AudioRange (start, end, ++next_time_id));
535 Selection::move_time (framecnt_t distance)
541 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
542 (*i).start += distance;
543 (*i).end += distance;
550 Selection::replace (uint32_t sid, framepos_t start, framepos_t end)
552 clear_objects(); //enforce object/range exclusivity
554 for (list<AudioRange>::iterator i = time.begin(); i != time.end(); ++i) {
555 if ((*i).id == sid) {
557 time.push_back (AudioRange(start,end, sid));
559 /* don't consolidate here */
562 AudioRangeComparator cmp;
572 Selection::add (boost::shared_ptr<Evoral::ControlList> cl)
574 clear_time(); //enforce object/range exclusivity
576 boost::shared_ptr<ARDOUR::AutomationList> al
577 = boost::dynamic_pointer_cast<ARDOUR::AutomationList>(cl);
579 warning << "Programming error: Selected list is not an ARDOUR::AutomationList" << endmsg;
582 if (find (lines.begin(), lines.end(), al) == lines.end()) {
583 lines.push_back (al);
589 Selection::remove (TimeAxisView* track)
591 list<TimeAxisView*>::iterator i;
592 if ((i = find (tracks.begin(), tracks.end(), track)) != tracks.end()) {
594 if (!_no_tracks_changed) {
601 Selection::remove (ControlPoint* p)
603 PointSelection::iterator i = find (points.begin(), points.end(), p);
604 if (i != points.end ()) {
610 Selection::remove (const TrackViewList& track_list)
612 bool changed = false;
614 for (TrackViewList::const_iterator i = track_list.begin(); i != track_list.end(); ++i) {
616 TrackViewList::iterator x = find (tracks.begin(), tracks.end(), *i);
617 if (x != tracks.end()) {
624 if (!_no_tracks_changed) {
631 Selection::remove (const MidiNoteSelection& midi_list)
633 bool changed = false;
635 for (MidiNoteSelection::const_iterator i = midi_list.begin(); i != midi_list.end(); ++i) {
637 MidiNoteSelection::iterator x;
639 if ((x = find (midi_notes.begin(), midi_notes.end(), (*i))) != midi_notes.end()) {
640 midi_notes.erase (x);
651 Selection::remove (MidiCutBuffer* midi)
653 MidiNoteSelection::iterator x;
655 if ((x = find (midi_notes.begin(), midi_notes.end(), midi)) != midi_notes.end()) {
656 /* remember that we own the MCB */
658 midi_notes.erase (x);
664 Selection::remove (boost::shared_ptr<Playlist> track)
666 list<boost::shared_ptr<Playlist> >::iterator i;
667 if ((i = find (playlists.begin(), playlists.end(), track)) != playlists.end()) {
674 Selection::remove (const list<boost::shared_ptr<Playlist> >& pllist)
676 bool changed = false;
678 for (list<boost::shared_ptr<Playlist> >::const_iterator i = pllist.begin(); i != pllist.end(); ++i) {
680 list<boost::shared_ptr<Playlist> >::iterator x;
682 if ((x = find (playlists.begin(), playlists.end(), (*i))) != playlists.end()) {
694 Selection::remove (RegionView* r)
696 if (regions.remove (r)) {
700 if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) {
701 remove (&r->get_time_axis_view());
706 Selection::remove (MidiRegionView* mrv)
708 MidiRegionSelection::iterator x;
710 if ((x = find (midi_regions.begin(), midi_regions.end(), mrv)) != midi_regions.end()) {
711 midi_regions.erase (x);
712 MidiRegionsChanged ();
716 /* XXX fix this up ? */
717 if (Config->get_link_region_and_track_selection() && !regions.involves (r->get_time_axis_view())) {
718 remove (&r->get_time_axis_view());
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)
764 Selection::set (const TrackViewList& track_list)
771 Selection::set (const MidiNoteSelection& midi_list)
773 clear_time (); //enforce region/object exclusivity
779 Selection::set (boost::shared_ptr<Playlist> playlist)
781 clear_time (); //enforce region/object exclusivity
787 Selection::set (const list<boost::shared_ptr<Playlist> >& pllist)
789 clear_time(); //enforce region/object exclusivity
795 Selection::set (const RegionSelection& rs)
797 clear_time(); //enforce region/object exclusivity
800 RegionsChanged(); /* EMIT SIGNAL */
804 Selection::set (MidiRegionView* mrv)
806 clear_time(); //enforce region/object exclusivity
812 Selection::set (RegionView* r, bool also_clear_tracks)
814 clear_time(); //enforce region/object exclusivity
816 if (also_clear_tracks && !Config->get_link_region_and_track_selection()) {
817 /* clear_regions() will have done this if the link preference
826 Selection::set (vector<RegionView*>& v)
828 bool had_regions = !regions.empty();
830 clear_time(); //enforce region/object exclusivity
833 if (Config->get_link_region_and_track_selection()) {
835 /* there were regions before, so we're changing the
836 * region selection (likely), thus link region/track
837 * selection. relevant tracks will get selected
838 * as we ::add() below.
841 // make sure to deselect any automation selections
848 /** Set the start and end time of the time selection, without changing
849 * the list of tracks it applies to.
852 Selection::set (framepos_t start, framepos_t end)
854 clear_objects(); //enforce region/object exclusivity
857 if ((start == 0 && end == 0) || end < start) {
862 time.push_back (AudioRange (start, end, ++next_time_id));
864 /* reuse the first entry, and remove all the rest */
866 while (time.size() > 1) {
869 time.front().start = start;
870 time.front().end = end;
877 return time.front().id;
880 /** Set the start and end of the range selection. If more than one range
881 * is currently selected, the start of the earliest range and the end of the
882 * latest range are set. If no range is currently selected, this method
883 * selects a single range from start to end.
885 * @param start New start time.
886 * @param end New end time.
889 Selection::set_preserving_all_ranges (framepos_t start, framepos_t end)
891 clear_objects(); //enforce region/object exclusivity
893 if ((start == 0 && end == 0) || (end < start)) {
898 time.push_back (AudioRange (start, end, ++next_time_id));
900 time.sort (AudioRangeComparator ());
901 time.front().start = start;
902 time.back().end = end;
911 Selection::set (boost::shared_ptr<Evoral::ControlList> ac)
913 clear_time(); //enforce region/object exclusivity
920 Selection::selected (Marker* m)
922 return find (markers.begin(), markers.end(), m) != markers.end();
926 Selection::selected (TimeAxisView* tv)
928 return find (tracks.begin(), tracks.end(), tv) != tracks.end();
932 Selection::selected (RegionView* rv)
934 return find (regions.begin(), regions.end(), rv) != regions.end();
938 Selection::selected (ControlPoint* cp)
940 return find (points.begin(), points.end(), cp) != points.end();
944 Selection::empty (bool internal_selection)
946 bool object_level_empty = regions.empty () &&
949 playlists.empty () &&
952 playlists.empty () &&
957 if (!internal_selection) {
958 return object_level_empty;
961 /* this is intended to really only apply when using a Selection
965 return object_level_empty && midi_notes.empty();
969 Selection::toggle (ControlPoint* cp)
971 clear_time(); //enforce region/object exclusivity
973 cp->set_selected (!cp->get_selected ());
974 PointSelection::iterator i = find (points.begin(), points.end(), cp);
975 if (i == points.end()) {
976 points.push_back (cp);
981 PointsChanged (); /* EMIT SIGNAL */
985 Selection::toggle (vector<ControlPoint*> const & cps)
987 clear_time(); //enforce region/object exclusivity
989 for (vector<ControlPoint*>::const_iterator i = cps.begin(); i != cps.end(); ++i) {
995 Selection::toggle (list<Selectable*> const & selectables)
997 clear_time(); //enforce region/object exclusivity
1001 vector<RegionView*> rvs;
1002 vector<ControlPoint*> cps;
1004 for (std::list<Selectable*>::const_iterator i = selectables.begin(); i != selectables.end(); ++i) {
1005 if ((rv = dynamic_cast<RegionView*> (*i)) != 0) {
1007 } else if ((cp = dynamic_cast<ControlPoint*> (*i)) != 0) {
1010 fatal << _("programming error: ")
1011 << X_("unknown selectable type passed to Selection::toggle()")
1027 Selection::set (list<Selectable*> const & selectables)
1029 clear_time (); //enforce region/object exclusivity
1032 if (Config->get_link_region_and_track_selection ()) {
1040 Selection::add (PointSelection const & s)
1042 clear_time (); //enforce region/object exclusivity
1044 for (PointSelection::const_iterator i = s.begin(); i != s.end(); ++i) {
1045 points.push_back (*i);
1050 Selection::add (list<Selectable*> const & selectables)
1052 clear_time (); //enforce region/object exclusivity
1056 vector<RegionView*> rvs;
1057 vector<ControlPoint*> cps;
1059 for (std::list<Selectable*>::const_iterator i = selectables.begin(); i != selectables.end(); ++i) {
1060 if ((rv = dynamic_cast<RegionView*> (*i)) != 0) {
1062 } else if ((cp = dynamic_cast<ControlPoint*> (*i)) != 0) {
1065 fatal << _("programming error: ")
1066 << X_("unknown selectable type passed to Selection::add()")
1082 Selection::clear_points ()
1084 if (!points.empty()) {
1091 Selection::add (ControlPoint* cp)
1093 clear_time (); //enforce region/object exclusivity
1095 cp->set_selected (true);
1096 points.push_back (cp);
1097 PointsChanged (); /* EMIT SIGNAL */
1101 Selection::add (vector<ControlPoint*> const & cps)
1103 clear_time (); //enforce region/object exclusivity
1105 for (vector<ControlPoint*>::const_iterator i = cps.begin(); i != cps.end(); ++i) {
1106 (*i)->set_selected (true);
1107 points.push_back (*i);
1109 PointsChanged (); /* EMIT SIGNAL */
1113 Selection::set (ControlPoint* cp)
1115 clear_time (); //enforce region/object exclusivity
1117 if (cp->get_selected()) {
1121 for (uint32_t i = 0; i < cp->line().npoints(); ++i) {
1122 cp->line().nth (i)->set_selected (false);
1130 Selection::set (Marker* m)
1132 clear_time (); //enforce region/object exclusivity
1139 Selection::toggle (Marker* m)
1141 clear_time (); //enforce region/object exclusivity
1143 MarkerSelection::iterator i;
1145 if ((i = find (markers.begin(), markers.end(), m)) == markers.end()) {
1153 Selection::remove (Marker* m)
1155 MarkerSelection::iterator i;
1157 if ((i = find (markers.begin(), markers.end(), m)) != markers.end()) {
1164 Selection::add (Marker* m)
1166 clear_time (); //enforce region/object exclusivity
1168 if (find (markers.begin(), markers.end(), m) == markers.end()) {
1169 markers.push_back (m);
1175 Selection::add (const list<Marker*>& m)
1177 clear_time (); //enforce region/object exclusivity
1179 markers.insert (markers.end(), m.begin(), m.end());
1187 MarkerSelection::range (framepos_t& s, framepos_t& e)
1192 for (MarkerSelection::iterator i = begin(); i != end(); ++i) {
1194 if ((*i)->position() < s) {
1195 s = (*i)->position();
1198 if ((*i)->position() > e) {
1199 e = (*i)->position();
1203 s = std::min (s, e);
1204 e = std::max (s, e);
1208 Selection::get_state () const
1210 /* XXX: not complete; just sufficient to get track selection state
1211 so that re-opening plugin windows for editor mixer strips works
1214 XMLNode* node = new XMLNode (X_("Selection"));
1216 for (TrackSelection::const_iterator i = tracks.begin(); i != tracks.end(); ++i) {
1217 RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
1218 AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (*i);
1220 XMLNode* t = node->add_child (X_("RouteView"));
1221 t->add_property (X_("id"), atoi (rtv->route()->id().to_s().c_str()));
1223 XMLNode* t = node->add_child (X_("AutomationView"));
1224 t->add_property (X_("id"), atoi (atv->parent_route()->id().to_s().c_str()));
1225 t->add_property (X_("parameter"), EventTypeMap::instance().to_symbol (atv->parameter ()));
1229 for (MarkerSelection::const_iterator i = markers.begin(); i != markers.end(); ++i) {
1230 XMLNode* t = node->add_child (X_("Marker"));
1233 Location* loc = editor->find_location_from_marker (*i, is_start);
1235 t->add_property (X_("id"), atoi (loc->id().to_s().c_str()));
1236 t->add_property (X_("start"), is_start ? X_("yes") : X_("no"));
1243 Selection::set_state (XMLNode const & node, int)
1245 if (node.name() != X_("Selection")) {
1249 XMLNodeList children = node.children ();
1250 for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
1251 if ((*i)->name() == X_("RouteView")) {
1253 XMLProperty* prop_id = (*i)->property (X_("id"));
1255 PBD::ID id (prop_id->value ());
1256 RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
1261 } else if ((*i)->name() == X_("AutomationView")) {
1263 XMLProperty* prop_id = (*i)->property (X_("id"));
1264 XMLProperty* prop_parameter = (*i)->property (X_("parameter"));
1267 assert (prop_parameter);
1269 PBD::ID id (prop_id->value ());
1270 RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
1273 boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().new_parameter (prop_parameter->value ()));
1275 /* the automation could be for an entity that was never saved
1276 in the session file. Don't freak out if we can't find
1285 } else if ((*i)->name() == X_("Marker")) {
1287 XMLProperty* prop_id = (*i)->property (X_("id"));
1288 XMLProperty* prop_start = (*i)->property (X_("start"));
1290 assert (prop_start);
1292 PBD::ID id (prop_id->value ());
1293 Marker* m = editor->find_marker_from_location_id (id, string_is_affirmative (prop_start->value ()));
1306 Selection::remove_regions (TimeAxisView* t)
1308 RegionSelection::iterator i = regions.begin();
1309 while (i != regions.end ()) {
1310 RegionSelection::iterator tmp = i;
1313 if (&(*i)->get_time_axis_view() == t) {
1322 Selection::block_tracks_changed (bool yn)
1324 _no_tracks_changed = yn;