Map zone layers before checking their visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/10509
This commit is contained in:
parent
55b782d66e
commit
09d0f6e17c
|
@ -251,9 +251,11 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
|
||||||
|
|
||||||
if( m_view->IsDirty() )
|
if( m_view->IsDirty() )
|
||||||
{
|
{
|
||||||
if( m_backend != GAL_TYPE_OPENGL && // Already called in opengl
|
if( m_backend != GAL_TYPE_OPENGL // Already called in opengl
|
||||||
m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
|
&& m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
|
||||||
|
{
|
||||||
m_gal->ClearScreen();
|
m_gal->ClearScreen();
|
||||||
|
}
|
||||||
|
|
||||||
m_view->ClearTargets();
|
m_view->ClearTargets();
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,10 @@ void VIEW_GROUP::ViewDraw( int aLayer, VIEW* aView ) const
|
||||||
for( int i = 0; i < layers_count; i++ )
|
for( int i = 0; i < layers_count; i++ )
|
||||||
{
|
{
|
||||||
int layer = layers[i];
|
int layer = layers[i];
|
||||||
|
|
||||||
|
if( IsZoneLayer( layer ) )
|
||||||
|
layer = layer - LAYER_ZONE_START;
|
||||||
|
|
||||||
bool draw = aView->IsLayerVisible( layer );
|
bool draw = aView->IsLayerVisible( layer );
|
||||||
|
|
||||||
if( isSelection )
|
if( isSelection )
|
||||||
|
|
|
@ -1767,10 +1767,10 @@ void PCB_PAINTER::draw( const ZONE* aZone, int aLayer )
|
||||||
|
|
||||||
// Draw each contour (main contour and holes)
|
// Draw each contour (main contour and holes)
|
||||||
|
|
||||||
/* This line:
|
/*
|
||||||
* m_gal->DrawPolygon( *outline );
|
* m_gal->DrawPolygon( *outline );
|
||||||
* should be enough, but currently does not work to draw holes contours in a complex polygon
|
* should be enough, but currently does not work to draw holes contours in a complex
|
||||||
* so each contour is draw as a simple polygon
|
* polygon so each contour is draw as a simple polygon
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Draw the main contour
|
// Draw the main contour
|
||||||
|
|
Loading…
Reference in New Issue