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

@ -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);