if( node->getParent()->getParent() == _node
&& node->getParent()->getNameString() == "placement" )
{
- bool placement_dirty = false;
- BOOST_FOREACH(Placements& placements, _placements)
+ size_t index = node->getIndex();
+ if( index < _placements.size() )
{
- BOOST_FOREACH(PlacementPtr& placement, placements)
+ Placements& placements = _placements[index];
+ if( !placements.empty() )
{
- // check if change can be directly handled by placement
- if( placement->getProps() == node->getParent()
- && !placement->childChanged(node) )
- placement_dirty = true;
+ bool placement_dirty = false;
+ BOOST_FOREACH(PlacementPtr& placement, placements)
+ {
+ // check if change can be directly handled by placement
+ if( placement->getProps() == node->getParent()
+ && !placement->childChanged(node) )
+ placement_dirty = true;
+ }
+
+ if( !placement_dirty )
+ return;
}
}
- if( !placement_dirty )
- return;
-
// prevent double updates...
for( size_t i = 0; i < _dirty_placements.size(); ++i )
{