+ //----------------------------------------------------------------------------
+ void Image::valueChanged(SGPropertyNode* child)
+ {
+ // If the image is switched from invisible to visible, and it shows a
+ // canvas, we need to delay showing it by one frame to ensure the canvas is
+ // updated before the image is displayed.
+ //
+ // As canvas::Element handles and filters changes to the "visible" property
+ // we can not check this in Image::childChanged but instead have to override
+ // Element::valueChanged.
+ if( !isVisible()
+ && child->getParent() == _node
+ && child->getNameString() == "visible"
+ && child->getBoolValue() )
+ {
+ CullCallback* cb = static_cast<CullCallback*>(_geom->getCullCallback());
+ if( cb )
+ cb->cullNextFrame();
+ }
+
+ Element::valueChanged(child);
+ }
+