mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 12:45:45 +01:00
trigger_ui: better connection management: watch both the Trigger and the Box
This commit is contained in:
parent
192d513cba
commit
07738e815b
2 changed files with 9 additions and 4 deletions
|
|
@ -110,7 +110,7 @@ TriggerUI::TriggerUI ()
|
|||
TriggerUI::~TriggerUI()
|
||||
{
|
||||
trigger_swap_connection.disconnect ();
|
||||
trigger_connections.disconnect ();
|
||||
trigger_connections.drop_connections ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -120,8 +120,11 @@ TriggerUI::trigger_swap (uint32_t n)
|
|||
/* some other slot in the same box got swapped. we don't care */
|
||||
return;
|
||||
}
|
||||
trigger_connections.disconnect ();
|
||||
trigger_connections.drop_connections ();
|
||||
|
||||
trigger()->PropertyChanged.connect (trigger_connections, MISSING_INVALIDATOR, boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ());
|
||||
tref.box->PropertyChanged.connect (trigger_connections, MISSING_INVALIDATOR, boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ());
|
||||
|
||||
trigger_changed (Properties::name);
|
||||
}
|
||||
|
||||
|
|
@ -812,7 +815,7 @@ TriggerUI::trigger_changed (PropertyChange const& what)
|
|||
void
|
||||
TriggerUI::set_trigger (ARDOUR::TriggerReference tr)
|
||||
{
|
||||
trigger_connections.disconnect();
|
||||
trigger_connections.drop_connections();
|
||||
trigger_swap_connection.disconnect();
|
||||
|
||||
tref = tr;
|
||||
|
|
@ -834,5 +837,7 @@ TriggerUI::set_trigger (ARDOUR::TriggerReference tr)
|
|||
trigger_changed (pc);
|
||||
|
||||
trigger()->PropertyChanged.connect (trigger_connections, MISSING_INVALIDATOR, boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context());
|
||||
tref.box->PropertyChanged.connect (trigger_connections, MISSING_INVALIDATOR, boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ());
|
||||
|
||||
tref.box->TriggerSwapped.connect (trigger_swap_connection, MISSING_INVALIDATOR, boost::bind (&TriggerUI::trigger_swap, this, _1), gui_context ());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue