libpbd: change static trigger property change signal to take Trigger*
When we add a region to a slot, we create a new Trigger, set its region, then arrange for an "atomic" swap with the existing Trigger. This means that the property change signal is emitted on a Trigger that does not yet exist inside a TriggerBox, and so cannot be found using row/col or x,y coordinates. Pass a raw pointer instead (lifetime management is not an issue ... or is it.
This commit is contained in:
parent
f3861a79b6
commit
5deea0c077
|
@ -415,7 +415,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
|
|||
void get_ui_state (UIState &state) const;
|
||||
void set_ui_state (UIState &state);
|
||||
|
||||
static PBD::Signal3<void,PBD::PropertyChange,int,int> TriggerPropertyChange;
|
||||
static PBD::Signal2<void,PBD::PropertyChange,Trigger*> TriggerPropertyChange;
|
||||
|
||||
protected:
|
||||
struct UIRequests {
|
||||
|
|
|
@ -202,7 +202,7 @@ FollowAction::to_string () const
|
|||
|
||||
|
||||
Trigger * const Trigger::MagicClearPointerValue = (Trigger*) 0xfeedface;
|
||||
PBD::Signal3<void,PropertyChange,int,int> Trigger::TriggerPropertyChange;
|
||||
PBD::Signal2<void,PropertyChange,Trigger*> Trigger::TriggerPropertyChange;
|
||||
|
||||
Trigger::Trigger (uint32_t n, TriggerBox& b)
|
||||
: _launch_style (Properties::launch_style, OneShot)
|
||||
|
@ -423,7 +423,7 @@ Trigger::send_property_change (PropertyChange pc)
|
|||
|
||||
PropertyChanged (pc);
|
||||
/* emit static signal for global observers */
|
||||
TriggerPropertyChange (pc, _box.order(), _index);
|
||||
TriggerPropertyChange (pc, this);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue
Block a user