Canvas: Ignore hidden element on event traversal.

This commit is contained in:
Thomas Geymayer
2013-06-29 14:12:59 +02:00
parent 36d1308aa6
commit c372591f36
+2 -2
View File
@@ -209,7 +209,7 @@ namespace canvas
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool Element::accept(EventVisitor& visitor) bool Element::accept(EventVisitor& visitor)
{ {
if( !_transform.valid() ) if( !isVisible() )
return false; return false;
return visitor.apply(*this); return visitor.apply(*this);
@@ -259,7 +259,7 @@ namespace canvas
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool Element::isVisible() const bool Element::isVisible() const
{ {
return _transform->getNodeMask() != 0; return _transform.valid() && _transform->getNodeMask() != 0;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------