Use region_fx_changed property signal instead of RegionFxChanged

This commit is contained in:
Robin Gareus 2026-01-19 03:40:26 +01:00
parent 5dccad42a2
commit 02da9cd746
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
8 changed files with 21 additions and 21 deletions

View file

@ -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

View file

@ -64,7 +64,6 @@ public:
private:
void region_changed (PBD::PropertyChange const&);
void region_fx_changed ();
void gain_changed ();
void gain_adjustment_changed ();

View file

@ -263,7 +263,6 @@ RegionEditor::RegionEditor (Session* s, std::shared_ptr<Region> 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*/) ())
{

View file

@ -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&);

View file

@ -58,7 +58,7 @@ RegionFxPropertiesBox::RegionFxPropertiesBox (std::shared_ptr<ARDOUR::Region> 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 ()
{

View file

@ -44,6 +44,7 @@ private:
void redisplay_plugins ();
void add_fx_to_display (std::weak_ptr<ARDOUR::RegionFxPlugin>);
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;
};

View file

@ -492,7 +492,7 @@ RegionListBase::populate_row (std::shared_ptr<Region> 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) {

View file

@ -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