Position dummy tuning pattern before trying to get length out of it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16165
This commit is contained in:
parent
ad70b50046
commit
efaa131bc4
|
@ -1717,6 +1717,8 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
dummyPattern.reset( PCB_TUNING_PATTERN::CreateNew( generatorTool, m_frame,
|
dummyPattern.reset( PCB_TUNING_PATTERN::CreateNew( generatorTool, m_frame,
|
||||||
m_pickerItem, mode, false ) );
|
m_pickerItem, mode, false ) );
|
||||||
|
dummyPattern->SetPosition( m_pickerItem->GetPosition() );
|
||||||
|
dummyPattern->SetEnd( m_pickerItem->GetPosition() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( dummyPattern )
|
if( dummyPattern )
|
||||||
|
@ -1729,6 +1731,8 @@ int DRAWING_TOOL::PlaceTuningPattern( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
dummyPattern->UpdateStatus( generatorTool, m_frame, m_statusPopup.get() );
|
dummyPattern->UpdateStatus( generatorTool, m_frame, m_statusPopup.get() );
|
||||||
m_statusPopup->Move( KIPLATFORM::UI::GetMousePosition() + wxPoint( 20, 20 ) );
|
m_statusPopup->Move( KIPLATFORM::UI::GetMousePosition() + wxPoint( 20, 20 ) );
|
||||||
|
|
||||||
|
generatorTool->Router()->StopRouting();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue