Formatting.
This commit is contained in:
parent
a675f1f9c5
commit
c0e5e8eeee
|
@ -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() );
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue