fix bug in SmSwitchboard::doAction

This commit is contained in:
wmayer
2018-01-26 16:47:56 +01:00
parent b092834230
commit 1719d0ba6b

View File

@@ -134,7 +134,7 @@ SmSwitchboard::doAction(SoAction * action)
for (int idx = 0; idx < this->enable.getNum(); idx++) {
const int numchildren = this->children->getLength();
if ( numchildren > 0 )
action->traverse((*this->children)[idx % numchildren]);
this->children->traverse(action, (idx % numchildren));
// If center point is set, accumulate.
if (bbaction->isCenterSet()) {
acccenter += bbaction->getCenter();
@@ -150,7 +150,7 @@ SmSwitchboard::doAction(SoAction * action)
if ( this->enable[idx] ) {
const int numchildren = this->children->getLength();
if ( numchildren > 0 )
action->traverse((*this->children)[idx % numchildren]);
this->children->traverse(action, (idx % numchildren));
}
}
}