Partial revert "Fix commit/view handling when dragging arcs"

Revert unintended formatting changes

This reverts commit f0988c3c5d.
This commit is contained in:
Jon Evans 2023-11-25 15:13:52 -05:00
parent f0988c3c5d
commit 1cb1fd3516
1 changed files with 68 additions and 66 deletions

View File

@ -528,8 +528,7 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
if( theArc->GetAngle() + maxTangentDeviation >= ANGLE_180 )
{
wxString msg = wxString::Format(
_( "Unable to resize arc tracks of %s or greater." ),
wxString msg = wxString::Format( _( "Unable to resize arc tracks of %s or greater." ),
EDA_UNIT_UTILS::UI::MessageTextFromValue( ANGLE_180 - maxTangentDeviation ) );
frame()->ShowInfoBarError( msg );
@ -565,8 +564,8 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
std::set<PCB_TRACK*> addedTracks;
auto getUniqueTrackAtAnchorCollinear = [&]( const VECTOR2I& aAnchor,
const SEG& aCollinearSeg ) -> PCB_TRACK*
auto getUniqueTrackAtAnchorCollinear =
[&]( const VECTOR2I& aAnchor, const SEG& aCollinearSeg ) -> PCB_TRACK*
{
std::shared_ptr<CONNECTIVITY_DATA> conn = board()->GetConnectivity();
@ -577,8 +576,9 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
for( int i = 0; i < 3; i++ )
{
itemsOnAnchor = conn->GetConnectedItemsAtAnchor(
theArc, aAnchor, { PCB_PAD_T, PCB_VIA_T, PCB_TRACE_T, PCB_ARC_T },
itemsOnAnchor = conn->GetConnectedItemsAtAnchor( theArc, aAnchor,
{ PCB_PAD_T, PCB_VIA_T,
PCB_TRACE_T, PCB_ARC_T },
allowedDeviation );
allowedDeviation /= 2;
@ -636,7 +636,8 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
if( tanIntersect = tanStart.IntersectLines( tanEnd ); !tanIntersect )
return 0;
auto isTrackStartClosestToArcStart = [&]( PCB_TRACK* aTrack ) -> bool
auto isTrackStartClosestToArcStart =
[&]( PCB_TRACK* aTrack ) -> bool
{
double trackStartToArcStart = GetLineLength( aTrack->GetStart(), theArc->GetStart() );
double trackEndToArcStart = GetLineLength( aTrack->GetEnd(), theArc->GetStart() );
@ -674,7 +675,8 @@ int EDIT_TOOL::DragArcTrack( const TOOL_EVENT& aEvent )
// * *
//
auto getFurthestPointToTanInterstect = [&]( VECTOR2I& aPointA, VECTOR2I& aPointB ) -> VECTOR2I
auto getFurthestPointToTanInterstect =
[&]( VECTOR2I& aPointA, VECTOR2I& aPointB ) -> VECTOR2I
{
if( ( aPointA - *tanIntersect ).EuclideanNorm()
> ( aPointB - *tanIntersect ).EuclideanNorm() )