From c0e5e8eeeee5323d4e2d1b2bf96bd078a56d59f7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 27 Dec 2020 12:36:11 +0000 Subject: [PATCH] Formatting. --- eeschema/tools/sch_line_wire_bus_tool.cpp | 8 ++++---- eeschema/tools/sch_move_tool.cpp | 22 +++++++++++++--------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/eeschema/tools/sch_line_wire_bus_tool.cpp b/eeschema/tools/sch_line_wire_bus_tool.cpp index 75fb48983b..324d231836 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.cpp +++ b/eeschema/tools/sch_line_wire_bus_tool.cpp @@ -990,9 +990,9 @@ int SCH_LINE_WIRE_BUS_TOOL::AddJunctionsIfNeeded( const TOOL_EVENT& aEvent ) void SCH_LINE_WIRE_BUS_TOOL::setTransitions() { Go( &SCH_LINE_WIRE_BUS_TOOL::AddJunctionsIfNeeded, EE_ACTIONS::addNeededJunctions.MakeEvent() ); - Go( &SCH_LINE_WIRE_BUS_TOOL::DrawSegments, EE_ACTIONS::drawWire.MakeEvent() ); - Go( &SCH_LINE_WIRE_BUS_TOOL::DrawSegments, EE_ACTIONS::drawBus.MakeEvent() ); - Go( &SCH_LINE_WIRE_BUS_TOOL::DrawSegments, EE_ACTIONS::drawLines.MakeEvent() ); + Go( &SCH_LINE_WIRE_BUS_TOOL::DrawSegments, EE_ACTIONS::drawWire.MakeEvent() ); + Go( &SCH_LINE_WIRE_BUS_TOOL::DrawSegments, EE_ACTIONS::drawBus.MakeEvent() ); + Go( &SCH_LINE_WIRE_BUS_TOOL::DrawSegments, EE_ACTIONS::drawLines.MakeEvent() ); - Go( &SCH_LINE_WIRE_BUS_TOOL::UnfoldBus, EE_ACTIONS::unfoldBus.MakeEvent() ); + Go( &SCH_LINE_WIRE_BUS_TOOL::UnfoldBus, EE_ACTIONS::unfoldBus.MakeEvent() ); } diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 58eceee41d..63c83eefb1 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -57,15 +57,17 @@ bool SCH_MOVE_TOOL::Init() { EE_TOOL_BASE::Init(); - auto moveCondition = [] ( const SELECTION& aSel ) { - if( aSel.Empty() ) - return false; + auto moveCondition = + []( const SELECTION& aSel ) + { + if( aSel.Empty() ) + return false; - if( SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus( aSel ) ) - return false; + if( SCH_LINE_WIRE_BUS_TOOL::IsDrawingLineWireOrBus( aSel ) ) + return false; - return true; - }; + return true; + }; // Add move actions to the selection tool menu // @@ -473,12 +475,12 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) else { // One last update after exiting loop (for slower stuff, such as updating SCREEN's RTree). - for( auto item : selection ) + for( EDA_ITEM* item : selection ) updateItem( item, true ); // If we move items away from a junction, we _may_ want to add a junction there // to denote the state. - for( auto it : internalPoints ) + for( const DANGLING_END_ITEM& it : internalPoints ) { if( m_frame->GetScreen()->IsJunctionNeeded( it.GetPosition(), true ) ) m_frame->AddJunction( m_frame->GetScreen(), it.GetPosition(), true, false ); @@ -722,7 +724,9 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta ) label->SetPosition( (wxPoint) currentLine.NearestPoint( info.originalLabelPos ) ); } else + { label->Move( (wxPoint) aDelta ); + } break; }