From d16a5bf87d1434fd46ecbda6db3ffd39a75df6ca Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Wed, 26 Mar 2025 17:05:38 +0000
Subject: [PATCH] Formatting.

---
 pcbnew/tools/pcb_control.cpp | 56 +++++++++++++++++++-----------------
 1 file changed, 29 insertions(+), 27 deletions(-)

diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp
index d97afa9861..856b03db7d 100644
--- a/pcbnew/tools/pcb_control.cpp
+++ b/pcbnew/tools/pcb_control.cpp
@@ -2017,34 +2017,36 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
             // Lambda to accumulate track length if item is a track or arc, otherwise mark invalid
             std::function<void( EDA_ITEM* )> accumulateTrackLength;
 
-            accumulateTrackLength = [&]( EDA_ITEM* aItem )
-            {
-                if( PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( aItem ) )
-                {
-                    selectedLength += track->GetLength();
-                }
-                else if( PCB_SHAPE* shape = dynamic_cast<PCB_SHAPE*>( aItem ) )
-                {
-                    const SHAPE_T shapeType = shape->GetShape();
-                    if( shapeType == SHAPE_T::SEGMENT || shapeType == SHAPE_T::ARC
-                        || shapeType == SHAPE_T::BEZIER )
+            accumulateTrackLength =
+                    [&]( EDA_ITEM* aItem )
                     {
-                        selectedLength += shape->GetLength();
-                    }
-                    else
-                    {
-                        lengthValid = false;
-                    }
-                }
-                else if( PCB_GROUP* group = dynamic_cast<PCB_GROUP*>( aItem ) )
-                {
-                    group->RunOnChildren( accumulateTrackLength );
-                }
-                else
-                {
-                    lengthValid = false;
-                }
-            };
+                        if( PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( aItem ) )
+                        {
+                            selectedLength += track->GetLength();
+                        }
+                        else if( PCB_SHAPE* shape = dynamic_cast<PCB_SHAPE*>( aItem ) )
+                        {
+                            const SHAPE_T shapeType = shape->GetShape();
+
+                            if( shapeType == SHAPE_T::SEGMENT || shapeType == SHAPE_T::ARC
+                                || shapeType == SHAPE_T::BEZIER )
+                            {
+                                selectedLength += shape->GetLength();
+                            }
+                            else
+                            {
+                                lengthValid = false;
+                            }
+                        }
+                        else if( PCB_GROUP* group = dynamic_cast<PCB_GROUP*>( aItem ) )
+                        {
+                            group->RunOnChildren( accumulateTrackLength );
+                        }
+                        else
+                        {
+                            lengthValid = false;
+                        }
+                    };
 
             for( EDA_ITEM* item : selection )
                 accumulateTrackLength( item );