Don't generate virtual vias when editing a tuning pattern.

This commit is contained in:
Jeff Young 2023-10-22 18:33:33 +01:00
parent f1efae1e05
commit 7c08aa09d5
2 changed files with 23 additions and 3 deletions

View File

@ -505,6 +505,8 @@ void PCB_TUNING_PATTERN::EditStart( GENERATOR_TOOL* aTool, BOARD* aBoard,
aCommit->Modify( this ); aCommit->Modify( this );
} }
SetFlags( IS_MOVING );
int layer = GetLayer(); int layer = GetLayer();
PNS::ROUTER* router = aTool->Router(); PNS::ROUTER* router = aTool->Router();

View File

@ -1155,9 +1155,15 @@ std::unique_ptr<PNS::SEGMENT> PNS_KICAD_IFACE_BASE::syncTrack( PCB_TRACK* aTrack
segment->SetLayers( LAYER_RANGE( aTrack->GetLayer() ) ); segment->SetLayers( LAYER_RANGE( aTrack->GetLayer() ) );
segment->SetParent( aTrack ); segment->SetParent( aTrack );
if( aTrack->IsLocked() || dynamic_cast<PCB_GENERATOR*>( aTrack->GetParentGroup() ) ) if( aTrack->IsLocked() )
segment->Mark( PNS::MK_LOCKED ); segment->Mark( PNS::MK_LOCKED );
if( PCB_GENERATOR* generator = dynamic_cast<PCB_GENERATOR*>( aTrack->GetParentGroup() ) )
{
if( !generator->IsMoving() )
segment->Mark( PNS::MK_LOCKED );
}
return segment; return segment;
} }
@ -1171,9 +1177,15 @@ std::unique_ptr<PNS::ARC> PNS_KICAD_IFACE_BASE::syncArc( PCB_ARC* aArc )
arc->SetLayers( LAYER_RANGE( aArc->GetLayer() ) ); arc->SetLayers( LAYER_RANGE( aArc->GetLayer() ) );
arc->SetParent( aArc ); arc->SetParent( aArc );
if( aArc->IsLocked() || dynamic_cast<PCB_GENERATOR*>( aArc->GetParentGroup() ) ) if( aArc->IsLocked() )
arc->Mark( PNS::MK_LOCKED ); arc->Mark( PNS::MK_LOCKED );
if( PCB_GENERATOR* generator = dynamic_cast<PCB_GENERATOR*>( aArc->GetParentGroup() ) )
{
if( !generator->IsMoving() )
arc->Mark( PNS::MK_LOCKED );
}
return arc; return arc;
} }
@ -1192,9 +1204,15 @@ std::unique_ptr<PNS::VIA> PNS_KICAD_IFACE_BASE::syncVia( PCB_VIA* aVia )
via->SetParent( aVia ); via->SetParent( aVia );
if( aVia->IsLocked() || dynamic_cast<PCB_GENERATOR*>( aVia->GetParentGroup() ) ) if( aVia->IsLocked() )
via->Mark( PNS::MK_LOCKED ); via->Mark( PNS::MK_LOCKED );
if( PCB_GENERATOR* generator = dynamic_cast<PCB_GENERATOR*>( aVia->GetParentGroup() ) )
{
if( !generator->IsMoving() )
via->Mark( PNS::MK_LOCKED );
}
via->SetIsFree( aVia->GetIsFree() ); via->SetIsFree( aVia->GetIsFree() );
via->SetHole( PNS::HOLE::MakeCircularHole( aVia->GetPosition(), aVia->GetDrillValue() / 2 ) ); via->SetHole( PNS::HOLE::MakeCircularHole( aVia->GetPosition(), aVia->GetDrillValue() / 2 ) );