Browse Source

router: take overlapping segments/arcs into account when syncing board state to router state

Fixes https://gitlab.com/kicad/code/kicad/issues/19581
pcb_db
Tomasz Wlostowski 9 months ago
parent
commit
4ee52a21d0
  1. 4
      pcbnew/router/pns_kicad_iface.cpp
  2. 3
      pcbnew/router/router_tool.cpp

4
pcbnew/router/pns_kicad_iface.cpp

@ -1741,12 +1741,12 @@ void PNS_KICAD_IFACE_BASE::SyncWorld( PNS::NODE *aWorld )
if( type == PCB_TRACE_T )
{
if( std::unique_ptr<PNS::SEGMENT> segment = syncTrack( t ) )
aWorld->Add( std::move( segment ) );
aWorld->Add( std::move( segment ), true );
}
else if( type == PCB_ARC_T )
{
if( std::unique_ptr<PNS::ARC> arc = syncArc( static_cast<PCB_ARC*>( t ) ) )
aWorld->Add( std::move( arc ) );
aWorld->Add( std::move( arc ), true );
}
else if( type == PCB_VIA_T )
{

3
pcbnew/router/router_tool.cpp

@ -2228,6 +2228,9 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
{
PNS::ITEM* pitem = m_router->GetWorld()->FindItemByParent( static_cast<const BOARD_ITEM*>( bitem ) );
if( !pitem )
continue;
if( pitem->OfKind( PNS::ITEM::SEGMENT_T ) || pitem->OfKind( PNS::ITEM::VIA_T ) || pitem->OfKind( PNS::ITEM::ARC_T ) )
{
itemsToDrag.Add( pitem );

Loading…
Cancel
Save