Fixed bug where PropertyAdjustmentCallback was being added multiple times.
This commit is contained in:
parent
751d7baf1c
commit
bbe59cd3e0
@ -40,9 +40,12 @@ public:
|
|||||||
{
|
{
|
||||||
osgVolume::VolumeTile* volumeTile = dynamic_cast<osgVolume::VolumeTile*>(&group);
|
osgVolume::VolumeTile* volumeTile = dynamic_cast<osgVolume::VolumeTile*>(&group);
|
||||||
if (volumeTile)
|
if (volumeTile)
|
||||||
|
{
|
||||||
|
if (dynamic_cast<osgVolume::PropertyAdjustmentCallback*>(volumeTile->getEventCallback())==0)
|
||||||
{
|
{
|
||||||
volumeTile->addEventCallback(new osgVolume::PropertyAdjustmentCallback());
|
volumeTile->addEventCallback(new osgVolume::PropertyAdjustmentCallback());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
traverse(group);
|
traverse(group);
|
||||||
|
Loading…
Reference in New Issue
Block a user