diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-04 18:06:54 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-04 18:08:36 +0200 |
commit | 608f99ad1cdfcfc20059f3fdb7ec0d6820615f70 (patch) | |
tree | a7441ecb61c92748f3fa81aa7d512fc0affc0bd7 | |
parent | 2fdeb54b7845f4077d1dd4b1158ea1c1e5a3e44b (diff) |
Fix a plugin-insert position off-by-one and remove cruft.
Route::before_processor_for_index() uses display_to_user() which
includes the Amp.
Insert position is still be wrong with the debug mode
ProcessorBox::show_all_processors == true, but that's not a regression.
-rw-r--r-- | gtk2_ardour/processor_box.cc | 34 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.h | 2 |
2 files changed, 0 insertions, 36 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 3d10ac7040..84767535a7 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -1809,7 +1809,6 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto , ab_direction (true) , _get_plugin_selector (get_plugin_selector) , _placement (-1) - , _visible_prefader_processors (0) , _p_selection(psel) , processor_display (drop_targets()) , _redisplay_pending (false) @@ -2229,10 +2228,6 @@ ProcessorBox::show_processor_menu (int arg) int x, y; processor_display.get_pointer (x, y); _placement = processor_display.add_placeholder (y); - - if (_visible_prefader_processors == 0 && _placement > 0) { - --_placement; - } } bool @@ -2687,7 +2682,6 @@ void ProcessorBox::redisplay_processors () { ENSURE_GUI_THREAD (*this, &ProcessorBox::redisplay_processors); - bool fader_seen; if (no_processor_redisplay) { return; @@ -2695,12 +2689,6 @@ ProcessorBox::redisplay_processors () processor_display.clear (); - _visible_prefader_processors = 0; - fader_seen = false; - - _route->foreach_processor (sigc::bind (sigc::mem_fun (*this, &ProcessorBox::help_count_visible_prefader_processors), - &_visible_prefader_processors, &fader_seen)); - _route->foreach_processor (sigc::mem_fun (*this, &ProcessorBox::add_processor_to_display)); _route->foreach_processor (sigc::mem_fun (*this, &ProcessorBox::maybe_add_processor_to_ui_list)); _route->foreach_processor (sigc::mem_fun (*this, &ProcessorBox::maybe_add_processor_pin_mgr)); @@ -2774,28 +2762,6 @@ ProcessorBox::maybe_add_processor_pin_mgr (boost::weak_ptr<Processor> w) p->set_pingmgr_proxy (wp); WM::Manager::instance().register_window (wp); } -void -ProcessorBox::help_count_visible_prefader_processors (boost::weak_ptr<Processor> p, uint32_t* cnt, bool* amp_seen) -{ - boost::shared_ptr<Processor> processor (p.lock ()); - - if (processor && ( processor->display_to_user() -#ifndef NDEBUG - || show_all_processors -#endif - ) - ) { - - if (boost::dynamic_pointer_cast<Amp>(processor) && - boost::dynamic_pointer_cast<Amp>(processor)->gain_control()->parameter().type() == GainAutomation) { - *amp_seen = true; - } else { - if (!*amp_seen) { - (*cnt)++; - } - } - } -} void ProcessorBox::add_processor_to_display (boost::weak_ptr<Processor> p) diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 331848efc1..fa614f9b6f 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -490,7 +490,6 @@ private: * put at the end of the plugin list. */ int _placement; - uint32_t _visible_prefader_processors; ProcessorSelection& _p_selection; static Gtkmm2ext::ActionMap myactions; @@ -537,7 +536,6 @@ private: bool processor_button_release_event (GdkEventButton *, ProcessorEntry *); void redisplay_processors (); void add_processor_to_display (boost::weak_ptr<ARDOUR::Processor>); - void help_count_visible_prefader_processors (boost::weak_ptr<ARDOUR::Processor>, uint32_t*, bool*); void reordered (); void report_failed_reorder (); void route_processors_changed (ARDOUR::RouteProcessorChange); |