diff options
author | Carl Hetherington <carl@carlh.net> | 2012-07-04 21:09:32 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-07-04 21:09:32 +0000 |
commit | 392a7fd2384ef2f77742b34b3b941b37ee505449 (patch) | |
tree | 4447340a0cd0e92900a500c5895fa172872c2565 /gtk2_ardour/audio_streamview.cc | |
parent | e35a84a32bedcb02396622b0b97dc0510aa11b91 (diff) |
Don't show previously hidden xfades when finishing a region
drag; should fix #4982.
git-svn-id: svn://localhost/ardour2/branches/3.0@12987 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_streamview.cc')
-rw-r--r-- | gtk2_ardour/audio_streamview.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index 80ed198ab1..6d24dff2ca 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -493,12 +493,14 @@ AudioStreamView::hide_all_fades () } /** Hide xfades for regions that overlap ar. - * @return AudioRegionViews that xfades were hidden for. + * @return Pair of lists; first is the AudioRegionViews that start xfades were hidden for, + * second is the AudioRegionViews that end xfades were hidden for. */ -list<AudioRegionView*> +pair<list<AudioRegionView*>, list<AudioRegionView*> > AudioStreamView::hide_xfades_with (boost::shared_ptr<AudioRegion> ar) { - list<AudioRegionView*> hidden; + list<AudioRegionView*> start_hidden; + list<AudioRegionView*> end_hidden; for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) { AudioRegionView* const arv = dynamic_cast<AudioRegionView*>(*i); @@ -507,14 +509,19 @@ AudioStreamView::hide_xfades_with (boost::shared_ptr<AudioRegion> ar) case Evoral::OverlapNone: break; default: + if (arv->start_xfade_visible ()) { + start_hidden.push_back (arv); + } + if (arv->end_xfade_visible ()) { + end_hidden.push_back (arv); + } arv->hide_xfades (); - hidden.push_back (arv); break; } } } - return hidden; + return make_pair (start_hidden, end_hidden); } void |