Allow vias to connect <no net> tracks even when DRC checking is on.
Fixes https://gitlab.com/kicad/code/kicad/issues/12403
(cherry picked from commit eaccd40c75
)
This commit is contained in:
parent
43f9863182
commit
fe7ed364b6
|
@ -2412,25 +2412,26 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
|
|||
if( DRC_ENGINE::IsNetTie( aOther ) )
|
||||
return false;
|
||||
|
||||
DRC_CONSTRAINT constraint;
|
||||
DRC_CONSTRAINT constraint;
|
||||
int clearance;
|
||||
BOARD_CONNECTED_ITEM* connectedItem = dynamic_cast<BOARD_CONNECTED_ITEM*>( aOther );
|
||||
ZONE* zone = dynamic_cast<ZONE*>( aOther );
|
||||
|
||||
if( ( aOther->Type() == PCB_ZONE_T || aOther->Type() == PCB_FP_ZONE_T )
|
||||
&& static_cast<ZONE*>( aOther )->GetIsRuleArea() )
|
||||
if( zone && zone->GetIsRuleArea() )
|
||||
{
|
||||
ZONE* ruleArea = static_cast<ZONE*>( aOther );
|
||||
|
||||
if( ruleArea->GetDoNotAllowVias() )
|
||||
return ruleArea->Outline()->Collide( aVia->GetPosition(), aVia->GetWidth() / 2 );
|
||||
if( zone->GetDoNotAllowVias() )
|
||||
return zone->Outline()->Collide( aVia->GetPosition(), aVia->GetWidth() / 2 );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
BOARD_CONNECTED_ITEM* cItem = dynamic_cast<BOARD_CONNECTED_ITEM*>( aOther );
|
||||
if( connectedItem )
|
||||
{
|
||||
int connectedItemNet = connectedItem->GetNetCode();
|
||||
|
||||
if( cItem && cItem->GetNetCode() == aVia->GetNetCode() )
|
||||
return false;
|
||||
|
||||
int clearance;
|
||||
if( connectedItemNet == 0 || connectedItemNet == aVia->GetNetCode() )
|
||||
return false;
|
||||
}
|
||||
|
||||
for( PCB_LAYER_ID layer : aOther->GetLayerSet().Seq() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue