summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_region_view.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-10-09 21:55:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-10-09 21:55:05 +0000
commitc64e96b6a8f6782a5ad0bc41b7200ec94408aaa5 (patch)
tree263f91bc44a8640f4bc65c56b3e567078dfd6e1e /gtk2_ardour/audio_region_view.cc
parent862d8e651f809c6937d9c027f5fd0acac111ca55 (diff)
add toggles for region fade in/out/both active, plus toggle for region fades visibility
git-svn-id: svn://localhost/ardour2/branches/3.0@3904 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r--gtk2_ardour/audio_region_view.cc39
1 files changed, 37 insertions, 2 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc
index 1c52a05ea6..40046cd9a1 100644
--- a/gtk2_ardour/audio_region_view.cc
+++ b/gtk2_ardour/audio_region_view.cc
@@ -567,7 +567,9 @@ AudioRegionView::reset_fade_in_shape_width (nframes_t width)
return;
}
- fade_in_shape->show();
+ if (Config->get_show_region_fades()) {
+ fade_in_shape->show();
+ }
float curve[npoints];
audio_region()->fade_in()->curve().get_vector (0, audio_region()->fade_in()->back()->when, curve, npoints);
@@ -653,7 +655,9 @@ AudioRegionView::reset_fade_out_shape_width (nframes_t width)
return;
}
- fade_out_shape->show();
+ if (Config->get_show_region_fades()) {
+ fade_out_shape->show();
+ }
float curve[npoints];
audio_region()->fade_out()->curve().get_vector (0, audio_region()->fade_out()->back()->when, curve, npoints);
@@ -1313,3 +1317,34 @@ AudioRegionView::set_frame_color ()
}
}
+void
+AudioRegionView::set_fade_visibility (bool yn)
+{
+ if (yn) {
+ if (fade_in_shape) {
+ fade_in_shape->show();
+ }
+ if (fade_out_shape) {
+ fade_out_shape->show ();
+ }
+ if (fade_in_handle) {
+ fade_in_handle->show ();
+ }
+ if (fade_out_handle) {
+ fade_out_handle->show ();
+ }
+ } else {
+ if (fade_in_shape) {
+ fade_in_shape->hide();
+ }
+ if (fade_out_shape) {
+ fade_out_shape->hide ();
+ }
+ if (fade_in_handle) {
+ fade_in_handle->hide ();
+ }
+ if (fade_out_handle) {
+ fade_out_handle->hide ();
+ }
+ }
+}