When listening to parameterChangedE() event from an ofParameterGroup, ofParameter triggers does not get caught by this event.
Is there a reason for the trigger() method not implementing notifying events to parents? similar to what ofParameter::eventsSetValue(...) does:
|
if(!obj->parents.empty()) |
|
{ |
|
// Erase each invalid parent |
|
obj->parents.erase(std::remove_if(obj->parents.begin(), |
|
obj->parents.end(), |
|
[this](const std::weak_ptr<ofParameterGroup::Value> & p){ return p.expired(); }), |
|
obj->parents.end()); |
|
|
|
// notify all leftover (valid) parents of this object's changed value. |
|
// this can't happen in the same iterator as above, because a notified listener |
|
// might perform similar cleanups that would corrupt our iterator |
|
// (which appens for example if the listener calls getFirstParent on us) |
|
for(auto & parent: obj->parents){ |
|
auto p = parent.lock(); |
|
if(p){ |
|
p->notifyParameterChanged(*this); |
|
} |
|
} |
|
} |
I can send a PR implementing this if needed.
When listening to parameterChangedE() event from an ofParameterGroup, ofParameter triggers does not get caught by this event.
Is there a reason for the trigger() method not implementing notifying events to parents? similar to what ofParameter::eventsSetValue(...) does:
openFrameworks/libs/openFrameworks/types/ofParameter.h
Lines 745 to 763 in 8d8c8ff
I can send a PR implementing this if needed.