Commit c91b4ffb authored by Maciej Suminski's avatar Maciej Suminski

Layer depth is set during items caching (so now they are rendered on proper layers).

parent a43dd351
...@@ -420,6 +420,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) ...@@ -420,6 +420,7 @@ void VIEW::redrawRect( const BOX2I& aRect )
{ {
drawItem drawFunc( this, l->id ); drawItem drawFunc( this, l->id );
if( !m_useGroups )
m_gal->SetLayerDepth( (double) l->renderingOrder ); m_gal->SetLayerDepth( (double) l->renderingOrder );
l->items->Query( aRect, drawFunc ); l->items->Query( aRect, drawFunc );
l->isDirty = false; l->isDirty = false;
...@@ -614,6 +615,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) ...@@ -614,6 +615,7 @@ void VIEW::RecacheAllItems( bool aImmediately )
for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i )
{ {
VIEW_LAYER* l = & ( ( *i ).second ); VIEW_LAYER* l = & ( ( *i ).second );
m_gal->SetLayerDepth( (double) l->renderingOrder );
recacheItem visitor( this, m_gal, l->id, aImmediately ); recacheItem visitor( this, m_gal, l->id, aImmediately );
l->items->Query( r, visitor ); l->items->Query( r, visitor );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment