Init zone type when creating in convert tool
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9918
This commit is contained in:
parent
196571d004
commit
62e6f542ed
|
@ -218,15 +218,25 @@ int CONVERT_TOOL::CreatePolys( const TOOL_EVENT& aEvent )
|
|||
|
||||
bool nonCopper = IsNonCopperLayer( destLayer );
|
||||
zoneInfo.m_Layers.reset().set( destLayer );
|
||||
zoneInfo.m_Name.Empty();
|
||||
|
||||
int ret;
|
||||
|
||||
if( aEvent.IsAction( &PCB_ACTIONS::convertToKeepout ) )
|
||||
{
|
||||
zoneInfo.SetIsRuleArea( true );
|
||||
ret = InvokeRuleAreaEditor( frame, &zoneInfo );
|
||||
}
|
||||
else if( nonCopper )
|
||||
{
|
||||
zoneInfo.SetIsRuleArea( false );
|
||||
ret = InvokeNonCopperZonesEditor( frame, &zoneInfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
zoneInfo.SetIsRuleArea( false );
|
||||
ret = InvokeCopperZonesEditor( frame, &zoneInfo );
|
||||
}
|
||||
|
||||
if( ret == wxID_CANCEL )
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue