Fix layer handling for create similar zone.

This commit is contained in:
Jeff Young 2023-10-20 22:20:30 +01:00
parent 903c01cb20
commit f18ce8c6de
1 changed files with 3 additions and 4 deletions

View File

@ -2541,12 +2541,11 @@ int DRAWING_TOOL::DrawZone( const TOOL_EVENT& aEvent )
params.m_keepout = drawMode == MODE::KEEPOUT; params.m_keepout = drawMode == MODE::KEEPOUT;
params.m_mode = zoneMode; params.m_mode = zoneMode;
params.m_sourceZone = sourceZone; params.m_sourceZone = sourceZone;
if( zoneMode == ZONE_MODE::SIMILAR )
params.m_layer = sourceZone->GetLayer();
else
params.m_layer = m_frame->GetActiveLayer(); params.m_layer = m_frame->GetActiveLayer();
if( zoneMode == ZONE_MODE::SIMILAR && !sourceZone->IsOnLayer( params.m_layer ) )
params.m_layer = sourceZone->GetFirstLayer();
ZONE_CREATE_HELPER zoneTool( *this, params ); ZONE_CREATE_HELPER zoneTool( *this, params );
// the geometry manager which handles the zone geometry, and hands the calculated points // the geometry manager which handles the zone geometry, and hands the calculated points
// over to the zone creator tool // over to the zone creator tool