Update DIFF_PAIR_PLACER to new callbacks
Needs to handle changes to PNS_ROUTER. This does not implement springback or backspace in DIFF_PAIR_PLACER, only allows committing lines as before Fixes https://gitlab.com/kicad/code/kicad/issues/3988
This commit is contained in:
parent
ecbfea68dd
commit
fe8524b9bb
|
@ -794,9 +794,7 @@ bool DIFF_PAIR_PLACER::FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForce
|
||||||
|
|
||||||
m_prevPair = m_currentTrace.EndingPrimitives();
|
m_prevPair = m_currentTrace.EndingPrimitives();
|
||||||
|
|
||||||
Router()->CommitRouting( m_lastNode );
|
CommitPlacement();
|
||||||
|
|
||||||
m_lastNode = NULL;
|
|
||||||
m_placingVia = false;
|
m_placingVia = false;
|
||||||
|
|
||||||
if( m_snapOnTarget || aForceFinish )
|
if( m_snapOnTarget || aForceFinish )
|
||||||
|
@ -812,6 +810,31 @@ bool DIFF_PAIR_PLACER::FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForce
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool DIFF_PAIR_PLACER::AbortPlacement()
|
||||||
|
{
|
||||||
|
m_world->KillChildren();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool DIFF_PAIR_PLACER::HasPlacedAnything() const
|
||||||
|
{
|
||||||
|
return m_currentTrace.CP().SegmentCount() > 0 ||
|
||||||
|
m_currentTrace.CN().SegmentCount() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool DIFF_PAIR_PLACER::CommitPlacement()
|
||||||
|
{
|
||||||
|
if( m_lastNode )
|
||||||
|
Router()->CommitRouting( m_lastNode );
|
||||||
|
|
||||||
|
m_lastNode = NULL;
|
||||||
|
m_currentNode = NULL;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIFF_PAIR_PLACER::GetModifiedNets( std::vector<int> &aNets ) const
|
void DIFF_PAIR_PLACER::GetModifiedNets( std::vector<int> &aNets ) const
|
||||||
{
|
{
|
||||||
aNets.push_back( m_netP );
|
aNets.push_back( m_netP );
|
||||||
|
|
|
@ -86,6 +86,12 @@ public:
|
||||||
*/
|
*/
|
||||||
bool FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForceFinish ) override;
|
bool FixRoute( const VECTOR2I& aP, ITEM* aEndItem, bool aForceFinish ) override;
|
||||||
|
|
||||||
|
bool CommitPlacement() override;
|
||||||
|
|
||||||
|
bool AbortPlacement() override;
|
||||||
|
|
||||||
|
bool HasPlacedAnything() const override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function ToggleVia()
|
* Function ToggleVia()
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue