From ad40083d4d32ff4472d85c8b149a184790262789 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 26 Apr 2010 00:25:32 +0000 Subject: [PATCH] Display region gain automation if it is 'interesting' (ie not just the default) git-svn-id: svn://localhost/ardour2/branches/3.0@6991 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_region_view.cc | 3 ++- gtk2_ardour/editor.cc | 1 - gtk2_ardour/editor.h | 3 --- gtk2_ardour/editor_ops.cc | 6 ------ gtk2_ardour/public_editor.h | 1 - 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index a3aa56d26f..d490ede63b 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -162,7 +162,8 @@ AudioRegionView::init (Gdk::Color const & basic_color, bool wfd) store_flags (); } - if (trackview.editor().new_regionviews_display_gain()) { + /* make envelope visible if it has anything interesting in it */ + if (audio_region()->envelope()->size() > 2) { _flags |= EnvelopeVisible; } diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 630499a9c4..9a3a94bf8d 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -360,7 +360,6 @@ Editor::Editor () entered_regionview = 0; entered_marker = 0; clear_entered_track = false; - _new_regionviews_show_envelope = false; current_timefx = 0; playhead_cursor = 0; button_release_can_deselect = true; diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index ebd735e335..8022fff2a3 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -390,7 +390,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void scroll_tracks_down_line (); void scroll_tracks_up_line (); - bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; } void prepare_for_cleanup (); void finish_cleanup (); @@ -1922,8 +1921,6 @@ public: void ensure_track_visible (TimeAxisView*); gint left_automation_track (); - bool _new_regionviews_show_envelope; - void reset_canvas_action_sensitivity (bool); void toggle_gain_envelope_visibility (); void toggle_gain_envelope_active (); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 7f3aa7f7a8..eb969b2d6a 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -170,11 +170,6 @@ Editor::split_regions_at (nframes64_t where, RegionSelection& regions) pl->freeze(); } - AudioRegionView* const arv = dynamic_cast(*a); - if (arv) { - _new_regionviews_show_envelope = arv->envelope_visible(); - } - if (pl) { pl->clear_history (); pl->split_region ((*a)->region(), where); @@ -191,7 +186,6 @@ Editor::split_regions_at (nframes64_t where, RegionSelection& regions) } commit_reversible_command (); - _new_regionviews_show_envelope = false; } boost::shared_ptr diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index 68d5c0d577..830dee5082 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -250,7 +250,6 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible { virtual void temporal_zoom_step (bool coarser) = 0; virtual void scroll_tracks_down_line () = 0; virtual void scroll_tracks_up_line () = 0; - virtual bool new_regionviews_display_gain () = 0; virtual void prepare_for_cleanup () = 0; virtual void finish_cleanup () = 0; virtual void reset_x_origin (nframes64_t frame) = 0;