From fc6f3f23327aeb92f4e2328050e4a8c954ef7ce1 Mon Sep 17 00:00:00 2001
From: Ian McInerney <ian.s.mcinerney@ieee.org>
Date: Thu, 20 Feb 2025 12:42:39 +0000
Subject: [PATCH] Formatting tweak

---
 common/eda_draw_frame.cpp                     |  6 ++-
 cvpcb/toolbars_cvpcb.cpp                      |  3 +-
 .../symbol_editor/toolbars_symbol_editor.cpp  |  3 +-
 eeschema/toolbars_sch_editor.cpp              |  3 +-
 eeschema/toolbars_symbol_viewer.cpp           |  3 +-
 gerbview/toolbars_gerber.cpp                  | 44 +++++++++++--------
 pagelayout_editor/toolbars_pl_editor.cpp      |  6 ++-
 pcbnew/pcb_base_frame.cpp                     |  3 +-
 pcbnew/toolbars_pcb_editor.cpp                |  9 ++--
 9 files changed, 49 insertions(+), 31 deletions(-)

diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp
index d5f60ba2e6..f3cd95a836 100644
--- a/common/eda_draw_frame.cpp
+++ b/common/eda_draw_frame.cpp
@@ -194,7 +194,8 @@ void EDA_DRAW_FRAME::configureToolbars()
     EDA_BASE_FRAME::configureToolbars();
 
     // Grid selection
-    auto gridSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto gridSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_gridSelectBox )
             {
@@ -211,7 +212,8 @@ void EDA_DRAW_FRAME::configureToolbars()
                                          _( "Grid Selection box" ), gridSelectorFactory );
 
     // Zoom selection
-    auto zoomSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto zoomSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_zoomSelectBox )
             {
diff --git a/cvpcb/toolbars_cvpcb.cpp b/cvpcb/toolbars_cvpcb.cpp
index 33d9c1982d..dd9f373952 100644
--- a/cvpcb/toolbars_cvpcb.cpp
+++ b/cvpcb/toolbars_cvpcb.cpp
@@ -65,7 +65,8 @@ void CVPCB_MAINFRAME::configureToolbars()
 {
     EDA_BASE_FRAME::configureToolbars();
 
-    auto footprintFilterFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto footprintFilterFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
 
             // wxGTK with GTK3 has a serious issue with bold texts: strings are incorrectly sized
diff --git a/eeschema/symbol_editor/toolbars_symbol_editor.cpp b/eeschema/symbol_editor/toolbars_symbol_editor.cpp
index 4608a9b4ca..85dc579d20 100644
--- a/eeschema/symbol_editor/toolbars_symbol_editor.cpp
+++ b/eeschema/symbol_editor/toolbars_symbol_editor.cpp
@@ -165,7 +165,8 @@ void SYMBOL_EDIT_FRAME::configureToolbars()
 {
     SCH_BASE_FRAME::configureToolbars();
 
-    auto unitDisplayFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto unitDisplayFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_unitSelectBox )
             {
diff --git a/eeschema/toolbars_sch_editor.cpp b/eeschema/toolbars_sch_editor.cpp
index f211ea2bec..f6ad3eff7a 100644
--- a/eeschema/toolbars_sch_editor.cpp
+++ b/eeschema/toolbars_sch_editor.cpp
@@ -209,7 +209,8 @@ void SCH_EDIT_FRAME::configureToolbars()
     // IPC/Scripting plugin control
     // TODO (ISM): Clean this up to make IPC actions just normal tool actions to get rid of this entire
     // control
-    auto pluginControlFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto pluginControlFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             // Add scripting console and API plugins
             bool scriptingAvailable = SCRIPTING::IsWxAvailable();
diff --git a/eeschema/toolbars_symbol_viewer.cpp b/eeschema/toolbars_symbol_viewer.cpp
index 5613e992dc..02bde0fa63 100644
--- a/eeschema/toolbars_symbol_viewer.cpp
+++ b/eeschema/toolbars_symbol_viewer.cpp
@@ -81,7 +81,8 @@ void SYMBOL_VIEWER_FRAME::configureToolbars()
     SCH_BASE_FRAME::configureToolbars();
 
     // Toolbar widget for selecting the unit to show in the symbol viewer
-    auto unitChoiceFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto unitChoiceFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_unitChoice )
             {
diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp
index 5da66e6bee..cec801f345 100644
--- a/gerbview/toolbars_gerber.cpp
+++ b/gerbview/toolbars_gerber.cpp
@@ -131,7 +131,8 @@ void GERBVIEW_FRAME::configureToolbars()
     EDA_DRAW_FRAME::configureToolbars();
 
     // Register factories for the various toolbar controls
-    auto layerBoxFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto layerBoxFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_SelLayerBox )
             {
@@ -160,7 +161,8 @@ void GERBVIEW_FRAME::configureToolbars()
                             _( "Layer selection" ), layerBoxFactory );
 
 
-    auto textInfoFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto textInfoFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_TextInfo )
             {
@@ -178,7 +180,8 @@ void GERBVIEW_FRAME::configureToolbars()
     // Creates box to display and choose components:
     // (note, when the m_tbTopAux is recreated, tools are deleted, but controls
     // are not deleted: they are just no longer managed by the toolbar
-    auto componentBoxFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto componentBoxFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_SelComponentBox )
                 m_SelComponentBox = new wxChoice( aToolbar, ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE );
@@ -202,7 +205,8 @@ void GERBVIEW_FRAME::configureToolbars()
 
 
     // Creates choice box to display net names and highlight selected:
-    auto netBoxFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto netBoxFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_SelNetnameBox )
             m_SelNetnameBox = new wxChoice( aToolbar, ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE );
@@ -224,7 +228,8 @@ void GERBVIEW_FRAME::configureToolbars()
 
 
     // Creates choice box to display aperture attributes and highlight selected:
-    auto appertureBoxFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto appertureBoxFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_SelAperAttributesBox )
             {
@@ -250,25 +255,26 @@ void GERBVIEW_FRAME::configureToolbars()
 
 
     // D-code selection
-    auto dcodeSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
-    {
-        if( !m_DCodeSelector )
+    auto dcodeSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
-            m_DCodeSelector = new DCODE_SELECTION_BOX( aToolbar,
-                                                    ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE,
-                                                    wxDefaultPosition, wxSize( 150, -1 ) );
-        }
+            if( !m_DCodeSelector )
+            {
+                m_DCodeSelector = new DCODE_SELECTION_BOX( aToolbar,
+                                                        ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE,
+                                                        wxDefaultPosition, wxSize( 150, -1 ) );
+            }
 
-        if( !m_dcodeText )
-            m_dcodeText = new wxStaticText( aToolbar, wxID_ANY, _( "DCode:" ) );
+            if( !m_dcodeText )
+                m_dcodeText = new wxStaticText( aToolbar, wxID_ANY, _( "DCode:" ) );
 
-        m_dcodeText->SetLabel( _( "DCode:" ) );
+            m_dcodeText->SetLabel( _( "DCode:" ) );
 
-        updateDCodeSelectBox();
+            updateDCodeSelectBox();
 
-        aToolbar->Add( m_dcodeText );
-        aToolbar->Add( m_DCodeSelector );
-    };
+            aToolbar->Add( m_dcodeText );
+            aToolbar->Add( m_DCodeSelector );
+        };
 
     RegisterCustomToolbarControlFactory( "control.GerberDcodeSelector", _( "DCode Selector" ),
                                          _( "Select all items with the selected DCode" ),
diff --git a/pagelayout_editor/toolbars_pl_editor.cpp b/pagelayout_editor/toolbars_pl_editor.cpp
index 8109241966..9cf6852fa4 100644
--- a/pagelayout_editor/toolbars_pl_editor.cpp
+++ b/pagelayout_editor/toolbars_pl_editor.cpp
@@ -119,7 +119,8 @@ void PL_EDITOR_FRAME::configureToolbars()
 {
     EDA_DRAW_FRAME::configureToolbars();
 
-    auto originSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto originSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_originSelectBox )
             {
@@ -138,7 +139,8 @@ void PL_EDITOR_FRAME::configureToolbars()
                                          originSelectorFactory );
 
 
-    auto pageSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto pageSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             wxString pageList[5] =
             {
diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp
index 3fa0ed8a10..bd9264d7f6 100644
--- a/pcbnew/pcb_base_frame.cpp
+++ b/pcbnew/pcb_base_frame.cpp
@@ -1278,7 +1278,8 @@ void PCB_BASE_FRAME::configureToolbars()
     EDA_DRAW_FRAME::configureToolbars();
 
     // Layer selector
-    auto layerSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto layerSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_SelLayerBox )
             {
diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp
index 07e24b65b6..40d7a740d6 100644
--- a/pcbnew/toolbars_pcb_editor.cpp
+++ b/pcbnew/toolbars_pcb_editor.cpp
@@ -381,7 +381,8 @@ void PCB_EDIT_FRAME::configureToolbars()
     PCB_BASE_FRAME::configureToolbars();
 
     // Box to display and choose track widths
-    auto trackWidthSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto trackWidthSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_SelTrackWidthBox )
             {
@@ -405,7 +406,8 @@ void PCB_EDIT_FRAME::configureToolbars()
 
 
     // Box to display and choose vias diameters
-    auto viaDiaSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto viaDiaSelectorFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             if( !m_SelViaSizeBox )
             {
@@ -424,7 +426,8 @@ void PCB_EDIT_FRAME::configureToolbars()
     // IPC/Scripting plugin control
     // TODO (ISM): Clean this up to make IPC actions just normal tool actions to get rid of this entire
     // control
-    auto pluginControlFactory = [this]( ACTION_TOOLBAR* aToolbar )
+    auto pluginControlFactory =
+        [this]( ACTION_TOOLBAR* aToolbar )
         {
             // Add scripting console and API plugins
             bool scriptingAvailable = SCRIPTING::IsWxAvailable();