derive TriggerUI from sigc::trackable so that it can be automically disconnected from signals
Note: this still seems suspicious: we explicitly disconnected from signals in the destructor. However, it is better form to be able to use invalidator() in the connection call
This commit is contained in:
parent
28db0c1d2b
commit
06eb154db2
|
@ -132,8 +132,8 @@ TriggerUI::trigger_swap (uint32_t n)
|
|||
}
|
||||
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()->PropertyChanged.connect (trigger_connections, invalidator (*this), boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ());
|
||||
tref.box->PropertyChanged.connect (trigger_connections, invalidator (*this), boost::bind (&TriggerUI::trigger_changed, this, _1), gui_context ());
|
||||
|
||||
trigger_changed (Properties::name);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Gtk
|
|||
|
||||
class TriggerJumpDialog;
|
||||
|
||||
class TriggerUI
|
||||
class TriggerUI : virtual public sigc::trackable
|
||||
{
|
||||
public:
|
||||
TriggerUI ();
|
||||
|
|
Loading…
Reference in New Issue
Block a user