diff options
author | Carl Hetherington <carl@carlh.net> | 2011-07-02 23:36:01 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-07-02 23:36:01 +0000 |
commit | 75eeb68e37cc32cd308762c0034557610d89b251 (patch) | |
tree | e9c0ee536937cc2375bcf38d1a40de8113710bca /gtk2_ardour | |
parent | 757d9565ca09f301feae53e3851052170387aa0c (diff) |
Minor refactoring; a few comments; don't try to add Amp processor automation curves using the generic mechanism as they are already special-cased separately (#4127).
git-svn-id: svn://localhost/ardour2/branches/3.0@9787 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.h | 5 |
2 files changed, 18 insertions, 7 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 7f9575f015..1157826b0d 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -265,12 +265,20 @@ RouteTimeAxisView::post_construct () /* map current state of the route */ update_diskstream_display (); + setup_processor_menu_and_curves (); + reset_processor_automation_curves (); +} +/** Set up the processor menu for the current set of processors, and + * display automation curves for any parameters which have data. + */ +void +RouteTimeAxisView::setup_processor_menu_and_curves () +{ _subplugin_menu_map.clear (); subplugin_menu.items().clear (); _route->foreach_processor (sigc::mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu)); _route->foreach_processor (sigc::mem_fun (*this, &RouteTimeAxisView::add_existing_processor_automation_curves)); - reset_processor_automation_curves (); } gint @@ -1840,6 +1848,7 @@ RouteTimeAxisView::find_processor_automation_node (boost::shared_ptr<Processor> return 0; } +/** Add an AutomationTimeAxisView to display automation for a processor's parameter */ void RouteTimeAxisView::add_processor_automation_curve (boost::shared_ptr<Processor> processor, Evoral::Parameter what) { @@ -1894,7 +1903,8 @@ RouteTimeAxisView::add_existing_processor_automation_curves (boost::weak_ptr<Pro { boost::shared_ptr<Processor> processor (p.lock ()); - if (!processor) { + if (!processor || boost::dynamic_pointer_cast<Amp> (processor)) { + /* The Amp processor is a special case and is dealt with separately */ return; } @@ -2090,11 +2100,7 @@ RouteTimeAxisView::processors_changed (RouteProcessorChange c) (*i)->valid = false; } - _subplugin_menu_map.clear (); - subplugin_menu.items().clear (); - - _route->foreach_processor (sigc::mem_fun (*this, &RouteTimeAxisView::add_processor_to_subplugin_menu)); - _route->foreach_processor (sigc::mem_fun (*this, &RouteTimeAxisView::add_existing_processor_automation_curves)); + setup_processor_menu_and_curves (); bool deleted_processor_automation = false; diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h index e087199c87..beae6b5201 100644 --- a/gtk2_ardour/route_time_axis.h +++ b/gtk2_ardour/route_time_axis.h @@ -240,6 +240,8 @@ protected: void create_gain_automation_child (const Evoral::Parameter &, bool); + void setup_processor_menu_and_curves (); + boost::shared_ptr<AutomationTimeAxisView> gain_track; StreamView* _view; @@ -270,6 +272,9 @@ protected: void set_track_mode (ARDOUR::TrackMode, bool apply_to_selection = false); + /** Information about all automatable processor parameters that apply to + * this route. The Amp processor is not included in this list. + */ std::list<ProcessorAutomationInfo*> processor_automation; typedef std::vector<boost::shared_ptr<AutomationLine> > ProcessorAutomationCurves; |