Fixed bug where PropertyAdjustmentCallback was being added multiple times.

This commit is contained in:
Robert Osfield 2010-06-16 16:49:45 +00:00
parent 751d7baf1c
commit bbe59cd3e0

View File

@ -41,7 +41,10 @@ public:
osgVolume::VolumeTile* volumeTile = dynamic_cast<osgVolume::VolumeTile*>(&group);
if (volumeTile)
{
volumeTile->addEventCallback(new osgVolume::PropertyAdjustmentCallback());
if (dynamic_cast<osgVolume::PropertyAdjustmentCallback*>(volumeTile->getEventCallback())==0)
{
volumeTile->addEventCallback(new osgVolume::PropertyAdjustmentCallback());
}
}
else
{