Create dummyPattern at centre of pickerItem, not end.

This keeps TOPOLOGY::AssembleDiffPair() from picking an
arc the segment might be connect to.  Since it can't handle
arcs at all, that's bad.
This commit is contained in:
Jeff Young 2023-12-20 15:27:29 +00:00
parent 7e72a53876
commit fc85112a72
2 changed files with 3 additions and 4 deletions

View File

@ -2049,8 +2049,8 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
{
dummyPattern.reset( PCB_TUNING_PATTERN::CreateNew( generatorTool, m_frame,
m_pickerItem, mode ) );
dummyPattern->SetPosition( m_pickerItem->GetPosition() );
dummyPattern->SetEnd( m_pickerItem->GetPosition() );
dummyPattern->SetPosition( m_pickerItem->GetFocusPosition() );
dummyPattern->SetEnd( m_pickerItem->GetFocusPosition() );
}
if( dummyPattern )
@ -2061,9 +2061,7 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
m_preview.FreeItems();
for( EDA_ITEM* item : dummyPattern->GetPreviewItems( generatorTool, m_frame ) )
{
m_preview.Add( item );
}
generatorTool->Router()->StopRouting();

View File

@ -321,6 +321,7 @@ public:
void SetPosition( const VECTOR2I& aPos ) override { m_Start = aPos; }
virtual VECTOR2I GetPosition() const override;
const VECTOR2I GetFocusPosition() const override { return m_Mid; }
virtual VECTOR2I GetCenter() const override { return GetPosition(); }