Minor cleanup.
This commit is contained in:
parent
be980df1ca
commit
5bb6b1a3cc
|
@ -439,10 +439,12 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
|
|||
tanIntersect = tanStart.IntersectLines( tanEnd ).get();
|
||||
|
||||
auto isTrackStartClosestToArcStart =
|
||||
[&]( PCB_TRACK* aPointA ) -> bool
|
||||
[&]( PCB_TRACK* aTrack ) -> bool
|
||||
{
|
||||
return GetLineLength( aPointA->GetStart(), theArc->GetStart() )
|
||||
< GetLineLength( aPointA->GetEnd(), theArc->GetStart() );
|
||||
double trackStartToArcStart = GetLineLength( aTrack->GetStart(), theArc->GetStart() );
|
||||
double trackEndToArcStart = GetLineLength( aTrack->GetEnd(), theArc->GetStart() );
|
||||
|
||||
return trackStartToArcStart < trackEndToArcStart;
|
||||
};
|
||||
|
||||
bool isStartTrackOnStartPt = isTrackStartClosestToArcStart( trackOnStart );
|
||||
|
@ -490,7 +492,6 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
|
|||
};
|
||||
|
||||
CIRCLE maxTanCircle;
|
||||
|
||||
VECTOR2I tanStartPoint = getFurthestPointToTanInterstect( tanStart.A, tanStart.B );
|
||||
VECTOR2I tanEndPoint = getFurthestPointToTanInterstect( tanEnd.A, tanEnd.B );
|
||||
VECTOR2I tempTangentPoint = tanEndPoint;
|
||||
|
@ -530,8 +531,8 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
|
|||
|
||||
for( VECTOR2I candidate : possiblePoints )
|
||||
{
|
||||
if( ( candidate - m_cursor ).EuclideanNorm()
|
||||
< ( closest - m_cursor ).EuclideanNorm() )
|
||||
if( ( candidate - m_cursor ).SquaredEuclideanNorm()
|
||||
< ( closest - m_cursor ).SquaredEuclideanNorm() )
|
||||
{
|
||||
closest = candidate;
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
/**
|
||||
* Drag-resize an arc (and change end points of connected straight segments).
|
||||
*/
|
||||
int DragArcTrack( const TOOL_EVENT& aEvent );
|
||||
int DragArcTrack( const TOOL_EVENT& aTrack );
|
||||
|
||||
/**
|
||||
* Display properties window for the selected object.
|
||||
|
|
Loading…
Reference in New Issue