Fixed remove and add callback so they properly handle nested callbacks
This commit is contained in:
parent
eb556797e2
commit
8cf9600e2c
@ -58,8 +58,7 @@ class OSG_EXPORT NodeCallback : public virtual Object {
|
||||
{
|
||||
if (_nestedCallback.valid())
|
||||
{
|
||||
nc->addNestedCallback(_nestedCallback.get());
|
||||
_nestedCallback = nc;
|
||||
_nestedCallback->addNestedCallback(nc);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -74,7 +73,9 @@ class OSG_EXPORT NodeCallback : public virtual Object {
|
||||
{
|
||||
if (_nestedCallback==nc)
|
||||
{
|
||||
_nestedCallback = _nestedCallback->getNestedCallback();
|
||||
ref_ptr<NodeCallback> new_nested_callback = _nestedCallback->getNestedCallback();
|
||||
_nestedCallback->setNestedCallback(0);
|
||||
_nestedCallback = new_nested_callback;
|
||||
}
|
||||
else if (_nestedCallback.valid())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user