mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +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
|
// Apply 45 degree or other constraints
|
||||||
if( m_altConstraint )
|
if( m_altConstraint )
|
||||||
{
|
{
|
||||||
|
m_editedPoint->SetPosition( pos );
|
||||||
m_altConstraint->Apply( grid );
|
m_altConstraint->Apply( grid );
|
||||||
}
|
}
|
||||||
else if( m_editedPoint->IsConstrained() )
|
else if( m_editedPoint->IsConstrained() )
|
||||||
{
|
{
|
||||||
|
m_editedPoint->SetPosition( pos );
|
||||||
m_editedPoint->ApplyConstraint( grid );
|
m_editedPoint->ApplyConstraint( grid );
|
||||||
}
|
}
|
||||||
else if( m_editedPoint->GetGridConstraint() == SNAP_TO_GRID )
|
else if( m_editedPoint->GetGridConstraint() == SNAP_TO_GRID )
|
||||||
{
|
{
|
||||||
m_editedPoint->SetPosition( grid.BestSnapAnchor( m_editedPoint->GetPosition(), snapLayers,
|
m_editedPoint->SetPosition( grid.BestSnapAnchor( pos, snapLayers, grid.GetItemGrid( item ),
|
||||||
grid.GetItemGrid( item ), { item } ) );
|
{ item } ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_editedPoint->SetPosition( pos );
|
||||||
}
|
}
|
||||||
|
|
||||||
updateItem( commit );
|
updateItem( commit );
|
||||||
@ -2164,8 +2168,7 @@ int PCB_POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
|
|||||||
VECTOR2I botRight = rect->GetBotRight();
|
VECTOR2I botRight = rect->GetBotRight();
|
||||||
VECTOR2I topRight( botRight.x, topLeft.y );
|
VECTOR2I topRight( botRight.x, topLeft.y );
|
||||||
VECTOR2I center( topRight.x - offset, topRight.y + offset );
|
VECTOR2I center( topRight.x - offset, topRight.y + offset );
|
||||||
radiusHelper->Set( radius, center, VECTOR2I( 1, -1 ),
|
radiusHelper->Set( radius, center, VECTOR2I( 1, -1 ), editFrame->GetUserUnits() );
|
||||||
editFrame->GetUserUnits() );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user