diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-15 19:33:09 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-11-15 19:33:09 +0000 |
commit | e2757229a74a17a76682b6c72868d8e4822b7678 (patch) | |
tree | 4216effdc70248f5504cb3ea435eb93259ec9866 /gtk2_ardour/selection.cc | |
parent | a7359ed2687fb124817f800280bf63dfc4d73322 (diff) |
provide link-editor-and-mixer-selection option. gui implementation is slightly hacky because of the implicit endless loop that the link creates
git-svn-id: svn://localhost/ardour2/branches/3.0@10624 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/selection.cc')
-rw-r--r-- | gtk2_ardour/selection.cc | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc index 5b7a88c81e..0b15bbec08 100644 --- a/gtk2_ardour/selection.cc +++ b/gtk2_ardour/selection.cc @@ -51,6 +51,7 @@ Selection::Selection (const PublicEditor* e) : tracks (e) , editor (e) , next_time_id (0) + , _no_tracks_changed (false) { clear (); @@ -129,7 +130,9 @@ Selection::clear_tracks () { if (!tracks.empty()) { tracks.clear (); - TracksChanged(); + if (!_no_tracks_changed) { + TracksChanged(); + } } } @@ -231,7 +234,9 @@ Selection::toggle (TimeAxisView* track) tracks.erase (i); } - TracksChanged(); + if (!_no_tracks_changed) { + TracksChanged(); + } } void @@ -353,7 +358,9 @@ Selection::add (const TrackViewList& track_list) TrackViewList added = tracks.add (track_list); if (!added.empty()) { - TracksChanged (); + if (!_no_tracks_changed) { + TracksChanged (); + } } } @@ -519,7 +526,9 @@ Selection::remove (TimeAxisView* track) list<TimeAxisView*>::iterator i; if ((i = find (tracks.begin(), tracks.end(), track)) != tracks.end()) { tracks.erase (i); - TracksChanged(); + if (!_no_tracks_changed) { + TracksChanged(); + } } } @@ -538,7 +547,9 @@ Selection::remove (const TrackViewList& track_list) } if (changed) { - TracksChanged(); + if (!_no_tracks_changed) { + TracksChanged(); + } } } @@ -1232,3 +1243,9 @@ Selection::remove_regions (TimeAxisView* t) i = tmp; } } + +void +Selection::block_tracks_changed (bool yn) +{ + _no_tracks_changed = yn; +} |