Print PCB objects before zones.

Fixes: lp:1785958
* https://bugs.launchpad.net/kicad/+bug/1785958
This commit is contained in:
Jeff Young 2018-08-26 20:40:22 +01:00
parent f611333ea1
commit 8fe5ff612d
1 changed files with 14 additions and 14 deletions

View File

@ -167,6 +167,20 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* DC, GR_DRAWMODE aDrawMode, const
zone->Draw( aPanel, DC, aDrawMode );
}
// Draw areas (i.e. zones)
for( int ii = 0; ii < GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = GetArea( ii );
// Areas must be drawn here only if not moved or dragged,
// because these areas are drawn by ManageCursor() in a specific manner
if( ( zone->GetFlags() & (IN_EDIT | IS_DRAGGED | IS_MOVED) ) == 0 )
{
zone->Draw( aPanel, DC, aDrawMode );
zone->DrawFilledArea( aPanel, DC, aDrawMode );
}
}
// Draw the graphic items
for( BOARD_ITEM* item = m_Drawings; item; item = item->Next() )
{
@ -187,20 +201,6 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* DC, GR_DRAWMODE aDrawMode, const
}
}
// Draw areas (i.e. zones)
for( int ii = 0; ii < GetAreaCount(); ii++ )
{
ZONE_CONTAINER* zone = GetArea( ii );
// Areas must be drawn here only if not moved or dragged,
// because these areas are drawn by ManageCursor() in a specific manner
if( ( zone->GetFlags() & (IN_EDIT | IS_DRAGGED | IS_MOVED) ) == 0 )
{
zone->Draw( aPanel, DC, aDrawMode );
zone->DrawFilledArea( aPanel, DC, aDrawMode );
}
}
LSET all_cu = LSET::AllCuMask();
for( MODULE* module = m_Modules; module; module = module->Next() )