router: expose the 'head' traces in a separate list for debug logs

This commit is contained in:
Tomasz Wlostowski 2023-01-09 23:17:50 +01:00
parent 4d208bac49
commit aa7271e55a
2 changed files with 11 additions and 10 deletions

View File

@ -772,7 +772,9 @@ bool ROUTER::movePlacing( const VECTOR2I& aP, ITEM* aEndItem )
return ret;
}
std::unique_ptr<NODE> ROUTER::GetUpdatedItems( std::vector<PNS::ITEM*>& aRemoved, std::vector<PNS::ITEM*>& aAdded )
void ROUTER::GetUpdatedItems( std::vector<PNS::ITEM*>& aRemoved, std::vector<PNS::ITEM*>& aAdded,
std::vector<PNS::ITEM*>& aHeads )
{
NODE *node;
ITEM_SET current;
@ -788,19 +790,15 @@ std::unique_ptr<NODE> ROUTER::GetUpdatedItems( std::vector<PNS::ITEM*>& aRemoved
current = m_dragger->Traces();
}
std::unique_ptr<NODE> tmpNode( node->Branch() );
node->GetUpdatedItems( aRemoved, aAdded );
for( auto item : current )
for( auto item : current.CItems() )
{
std::unique_ptr<ITEM> ip( item.item->Clone() );
tmpNode->Add( std::move( ip ) );
aHeads.push_back( item.item->Clone() );
}
tmpNode->GetUpdatedItems( aRemoved, aAdded );
return std::move( tmpNode );
}
void ROUTER::CommitRouting( NODE* aNode )
{
if( m_state == ROUTE_TRACK && !m_placer->HasPlacedAnything() )

View File

@ -150,7 +150,10 @@ public:
void UndoLastSegment();
void CommitRouting();
std::unique_ptr<NODE> GetUpdatedItems( std::vector<PNS::ITEM*>& aRemoved, std::vector<PNS::ITEM*>& aAdded );
void GetUpdatedItems( std::vector<PNS::ITEM*>& aRemoved, std::vector<PNS::ITEM*>& aAdded,
std::vector<PNS::ITEM*>& aHeads );
void StopRouting();
void ClearViewDecorations();