mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Don't set point to a value we're not going to keep.
It just causes flicker. Fixes https://gitlab.com/kicad/code/kicad/-/issues/19947
This commit is contained in:
parent
2321285c16
commit
a2e98fb53c
@ -2132,21 +2132,25 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
|
||||
}
|
||||
}
|
||||
|
||||
m_editedPoint->SetPosition( pos );
|
||||
|
||||
// Apply 45 degree or other constraints
|
||||
if( m_altConstraint )
|
||||
{
|
||||
m_editedPoint->SetPosition( pos );
|
||||
m_altConstraint->Apply( grid );
|
||||
}
|
||||
else if( m_editedPoint->IsConstrained() )
|
||||
{
|
||||
m_editedPoint->SetPosition( pos );
|
||||
m_editedPoint->ApplyConstraint( grid );
|
||||
}
|
||||
else if( m_editedPoint->GetGridConstraint() == SNAP_TO_GRID )
|
||||
{
|
||||
m_editedPoint->SetPosition( grid.BestSnapAnchor( m_editedPoint->GetPosition(), snapLayers,
|
||||
grid.GetItemGrid( item ), { item } ) );
|
||||
m_editedPoint->SetPosition( grid.BestSnapAnchor( pos, snapLayers, grid.GetItemGrid( item ),
|
||||
{ item } ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_editedPoint->SetPosition( pos );
|
||||
}
|
||||
|
||||
updateItem( commit );
|
||||
@ -2164,8 +2168,7 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
|
||||
VECTOR2I botRight = rect->GetBotRight();
|
||||
VECTOR2I topRight( botRight.x, topLeft.y );
|
||||
VECTOR2I center( topRight.x - offset, topRight.y + offset );
|
||||
radiusHelper->Set( radius, center, VECTOR2I( 1, -1 ),
|
||||
editFrame->GetUserUnits() );
|
||||
radiusHelper->Set( radius, center, VECTOR2I( 1, -1 ), editFrame->GetUserUnits() );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user