Fix inverted checks...

This commit is contained in:
Thomas Geymayer 2013-07-13 14:06:11 +02:00
parent 486011dceb
commit 7bd572f3ec

View File

@ -157,7 +157,7 @@ namespace canvas
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void Group::clearEventListener() void Group::clearEventListener()
{ {
if( _transform.valid() ) if( !_transform.valid() )
return warnTransformExpired("clearEventListener"); return warnTransformExpired("clearEventListener");
for(size_t i = 0; i < _transform->getNumChildren(); ++i) for(size_t i = 0; i < _transform->getNumChildren(); ++i)
@ -322,7 +322,7 @@ namespace canvas
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void Group::handleZIndexChanged(ElementPtr child, int z_index) void Group::handleZIndexChanged(ElementPtr child, int z_index)
{ {
if( !child || _transform.valid() ) if( !child || !_transform.valid() )
return; return;
osg::ref_ptr<osg::MatrixTransform> tf = child->getMatrixTransform(); osg::ref_ptr<osg::MatrixTransform> tf = child->getMatrixTransform();