diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-07 22:02:17 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-07 22:02:17 +0000 |
commit | 18b18a45a5df8b0189e0be0bd35c55efc5771223 (patch) | |
tree | 18345460d9e24fe895ffc2e7c39c57967a0aceab /gtk2_ardour/audio_region_view.cc | |
parent | aa64629dd309ea6c50a9ea7ba48b9aea4e09015d (diff) |
hide xfades while dragging region(s)
git-svn-id: svn://localhost/ardour2/branches/3.0@12202 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 885af4cd38..c277131618 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -87,7 +87,6 @@ AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView { } - AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &tv, boost::shared_ptr<AudioRegion> r, double spu, Gdk::Color const & basic_color, bool recording, TimeAxisViewItem::Visibility visibility) : RegionView (parent, tv, r, spu, basic_color, recording, visibility) @@ -554,6 +553,10 @@ AudioRegionView::reset_fade_in_shape () void AudioRegionView::reset_fade_in_shape_width (framecnt_t width) { + if (dragging()) { + return; + } + if (audio_region()->fade_in_is_xfade()) { fade_in_handle->hide (); fade_in_shape->hide (); @@ -655,6 +658,10 @@ AudioRegionView::reset_fade_out_shape () void AudioRegionView::reset_fade_out_shape_width (framecnt_t width) { + if (dragging()) { + return; + } + if (audio_region()->fade_out_is_xfade()) { fade_out_handle->hide (); fade_out_shape->hide (); @@ -1510,7 +1517,6 @@ void AudioRegionView::thaw_after_trim () { RegionView::thaw_after_trim (); - unhide_envelope (); } @@ -1518,6 +1524,8 @@ void AudioRegionView::redraw_start_xfade () { boost::shared_ptr<AudioRegion> ar (audio_region()); + + cerr << ":RSX\n"; if (!ar->fade_in() || ar->fade_in()->empty()) { return; @@ -1661,3 +1669,40 @@ AudioRegionView::redraw_end_xfade () delete points; } +void +AudioRegionView::drag_start () +{ + TimeAxisViewItem::drag_start (); + + if (start_xfade_in) { + start_xfade_in->hide(); + } + if (start_xfade_out) { + start_xfade_out->hide(); + } + if (end_xfade_in) { + end_xfade_in->hide(); + } + if (end_xfade_out) { + end_xfade_out->hide(); + } +} + +void +AudioRegionView::drag_end () +{ + TimeAxisViewItem::drag_end (); + + if (start_xfade_in) { + start_xfade_in->show(); + } + if (start_xfade_out) { + start_xfade_out->show(); + } + if (end_xfade_in) { + end_xfade_in->show(); + } + if (end_xfade_out) { + end_xfade_out->show(); + } +} |