diff options
author | Robin Gareus <robin@gareus.org> | 2016-05-01 13:11:43 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-05-01 13:11:43 +0200 |
commit | 7bed91938bbd13fedc190802b4d6761e1cbf7fbb (patch) | |
tree | 0b40c9e3dcd5c641185bb49ea48fb56a7dd8448b /gtk2_ardour | |
parent | b85de0666978ead0109c3ec0638c265763aa7c7c (diff) |
fix adding favorite plugins post-fader
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 75c15e18c5..97b43bb398 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -2405,13 +2405,22 @@ Mixer_UI::add_favorite_processor (ARDOUR::PluginPresetPtr ppp, ProcessorPosition case AddPostFader: { int idx = 0; + int pos = 0; for (;;++idx) { boost::shared_ptr<Processor> np = rt->nth_processor (idx); - if (!np || boost::dynamic_pointer_cast<Amp> (np)) { + if (!np) { break; } + if (!np->display_to_user()) { + continue; + } + if (boost::dynamic_pointer_cast<Amp> (np) && // Fader, not Trim + boost::dynamic_pointer_cast<Amp> (np)->gain_control()->parameter().type() == GainAutomation) { + break; + } + ++pos; } - rt->add_processor_by_index (processor, ++idx, &err, Config->get_new_plugins_active ()); + rt->add_processor_by_index (processor, ++pos, &err, Config->get_new_plugins_active ()); } break; case AddBottom: |