diff --git a/gtk2_ardour/audio_region_editor.cc b/gtk2_ardour/audio_region_editor.cc index e57708d222..0d9242c56b 100644 --- a/gtk2_ardour/audio_region_editor.cc +++ b/gtk2_ardour/audio_region_editor.cc @@ -176,13 +176,9 @@ AudioRegionEditor::region_changed (const PBD::PropertyChange& what_changed) /* ask the peak thread to run again */ signal_peak_thread (); } -} - -void -AudioRegionEditor::region_fx_changed () -{ - RegionEditor::region_fx_changed (); - refill_region_line (); + if (what_changed.contains (ARDOUR::Properties::region_fx_changed)) { + refill_region_line (); + } } void diff --git a/gtk2_ardour/audio_region_editor.h b/gtk2_ardour/audio_region_editor.h index a97133d855..fac5e723b4 100644 --- a/gtk2_ardour/audio_region_editor.h +++ b/gtk2_ardour/audio_region_editor.h @@ -64,7 +64,6 @@ public: private: void region_changed (PBD::PropertyChange const&); - void region_fx_changed (); void gain_changed (); void gain_adjustment_changed (); diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc index 7d8cdc6978..780389bb1b 100644 --- a/gtk2_ardour/region_editor.cc +++ b/gtk2_ardour/region_editor.cc @@ -263,7 +263,6 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr r) region_changed (change); _region->PropertyChanged.connect (_state_connection, invalidator (*this), std::bind (&RegionEditor::region_changed, this, _1), gui_context ()); - _region->RegionFxChanged.connect (_region_connection, invalidator (*this), std::bind (&RegionEditor::region_fx_changed, this), gui_context ()); _spin_arrow_grab = false; @@ -319,6 +318,10 @@ RegionEditor::region_changed (const PBD::PropertyChange& what_changed) if (what_changed.contains (tempo_stuff)) { tempo_changed (what_changed); } + + if (what_changed.contains (ARDOUR::Properties::region_fx_changed)) { + _region_fx_box.redisplay_plugins (); + } } void @@ -342,12 +345,6 @@ RegionEditor::tempo_changed (PBD::PropertyChange const & changed) } } -void -RegionEditor::region_fx_changed () -{ - _region_fx_box.redisplay_plugins (); -} - gint RegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* /*but*/, void (RegionEditor::* /*pmf*/) ()) { diff --git a/gtk2_ardour/region_editor.h b/gtk2_ardour/region_editor.h index 1aa1d22dfc..e3d84c91fa 100644 --- a/gtk2_ardour/region_editor.h +++ b/gtk2_ardour/region_editor.h @@ -70,7 +70,6 @@ public: protected: virtual void region_changed (const PBD::PropertyChange&); - virtual void region_fx_changed (); Gtk::Table _table_main; Gtk::Table _table_clocks; @@ -192,7 +191,6 @@ private: PBD::ScopedConnection _state_connection; PBD::ScopedConnection _audition_connection; - PBD::ScopedConnection _region_connection; void bounds_changed (const PBD::PropertyChange&); void tempo_changed (const PBD::PropertyChange&); diff --git a/gtk2_ardour/region_fx_properties_box.cc b/gtk2_ardour/region_fx_properties_box.cc index 5950ca7eb4..68f2a34361 100644 --- a/gtk2_ardour/region_fx_properties_box.cc +++ b/gtk2_ardour/region_fx_properties_box.cc @@ -58,7 +58,7 @@ RegionFxPropertiesBox::RegionFxPropertiesBox (std::shared_ptr r) viewport->set_shadow_type(Gtk::SHADOW_NONE); viewport->set_border_width(0); - _region->RegionFxChanged.connect (_region_connection, invalidator (*this), std::bind (&RegionFxPropertiesBox::idle_redisplay_plugins, this), gui_context ()); + _region->PropertyChanged.connect (_region_connection, invalidator (*this), std::bind (&RegionFxPropertiesBox::region_property_changed, this, _1), gui_context ()); redisplay_plugins (); } @@ -73,6 +73,14 @@ RegionFxPropertiesBox::~RegionFxPropertiesBox () } } +void +RegionFxPropertiesBox::region_property_changed (PBD::PropertyChange const& what_changed) +{ + if (what_changed.contains (Properties::region_fx_changed)) { + idle_redisplay_plugins (); + } +} + void RegionFxPropertiesBox::drop_plugin_uis () { diff --git a/gtk2_ardour/region_fx_properties_box.h b/gtk2_ardour/region_fx_properties_box.h index 7d49276150..6bc373cb9e 100644 --- a/gtk2_ardour/region_fx_properties_box.h +++ b/gtk2_ardour/region_fx_properties_box.h @@ -44,6 +44,7 @@ private: void redisplay_plugins (); void add_fx_to_display (std::weak_ptr); void idle_redisplay_plugins (); + void region_property_changed (PBD::PropertyChange const&); static int _idle_redisplay_processors (gpointer); @@ -57,5 +58,4 @@ private: PBD::ScopedConnectionList _processor_connections; PBD::ScopedConnection _region_connection; - sigc::connection screen_update_connection; }; diff --git a/gtk2_ardour/region_list_base.cc b/gtk2_ardour/region_list_base.cc index f69d2a4f40..6247a05869 100644 --- a/gtk2_ardour/region_list_base.cc +++ b/gtk2_ardour/region_list_base.cc @@ -492,7 +492,7 @@ RegionListBase::populate_row (std::shared_ptr region, TreeModel::Row con populate_row_end (region, row); populate_row_length (region, row); } - if (all || what_changed.contains (Properties::region_fx)) { + if (all || what_changed.contains (Properties::region_fx_changed)) { populate_row_regionfx (region, row); } if (all) { diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc index fb319d7724..de0ba99b61 100644 --- a/gtk2_ardour/region_view.cc +++ b/gtk2_ardour/region_view.cc @@ -241,7 +241,6 @@ RegionView::init (bool wfd) //set_height (trackview.current_height()); _region->PropertyChanged.connect (*this, invalidator (*this), std::bind (&RegionView::region_changed, this, _1), gui_context()); - _region->RegionFxChanged.connect (*this, invalidator (*this), std::bind (&RegionView::region_renamed, this), gui_context()); /* derived class calls set_colors () including RegionView::set_colors() in ::init() */ //set_colors (); @@ -460,6 +459,9 @@ RegionView::region_changed (const PropertyChange& what_changed) if (what_changed.contains (ARDOUR::Properties::locked)) { region_locked (); } + if (what_changed.contains (ARDOUR::Properties::region_fx_changed)) { + region_renamed (); + } } void