Code formatting
This commit is contained in:
parent
5e70810161
commit
25abe30c72
|
@ -833,6 +833,7 @@ void SCH_EDIT_FRAME::PrepareMoveItem( SCH_ITEM* aItem, wxDC* aDC )
|
|||
m_canvas->Refresh();
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::SelectAllFromSheet( wxCommandEvent& aEvent )
|
||||
{
|
||||
SCH_SCREEN* screen = GetScreen();
|
||||
|
@ -848,16 +849,16 @@ void SCH_EDIT_FRAME::SelectAllFromSheet( wxCommandEvent& aEvent )
|
|||
// If we didn't get here by a hot key, then something has gone wrong.
|
||||
if( aEvent.GetInt() == 0 )
|
||||
return;
|
||||
|
||||
EDA_HOTKEY_CLIENT_DATA* data = (EDA_HOTKEY_CLIENT_DATA*) aEvent.GetClientObject();
|
||||
|
||||
wxCHECK_RET( data != NULL, wxT( "Invalid hot key client object." ) );
|
||||
|
||||
item = LocateAndShowItem( data->GetPosition() );
|
||||
SendMessageToPCBNEW( item, NULL );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||
{
|
||||
|
|
|
@ -1564,9 +1564,11 @@ D_PAD* BOARD::GetPad( TRACK* aTrace, ENDPOINT_T aEndPoint )
|
|||
|
||||
}
|
||||
|
||||
|
||||
std::list<TRACK*> BOARD::GetTracksByPosition( const wxPoint& aPosition, PCB_LAYER_ID aLayer ) const
|
||||
{
|
||||
std::list<TRACK*> tracks;
|
||||
|
||||
for( TRACK* track = GetFirstTrack( m_Track ); track; track = GetFirstTrack( track->Next() ) )
|
||||
{
|
||||
if( ( ( track->GetStart() == aPosition ) || track->GetEnd() == aPosition ) &&
|
||||
|
@ -1575,6 +1577,7 @@ std::list<TRACK*> BOARD::GetTracksByPosition( const wxPoint& aPosition, PCB_LAYE
|
|||
|
||||
tracks.push_back( track );
|
||||
}
|
||||
|
||||
return tracks;
|
||||
}
|
||||
|
||||
|
|
|
@ -498,6 +498,9 @@ inline VIA* GetFirstVia( TRACK* aTrk, const TRACK* aStopPoint = NULL )
|
|||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/// Scan a track list for the first TRACK object. Returns NULL if not found (or NULL passed)
|
||||
inline TRACK* GetFirstTrack( TRACK* aTrk, const TRACK* aStopPoint = NULL )
|
||||
{
|
||||
while( aTrk && ( aTrk != aStopPoint ) && ( aTrk->Type() != PCB_TRACE_T ) )
|
||||
|
|
|
@ -915,9 +915,11 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetpath )
|
|||
|
||||
// auto select trivial connections segments which are launched from the pads
|
||||
std::list<TRACK*> launchTracks;
|
||||
|
||||
for( auto pad : padList )
|
||||
{
|
||||
launchTracks = board()->GetTracksByPosition( pad->GetPosition() );
|
||||
|
||||
for( auto track : launchTracks )
|
||||
{
|
||||
selectAllItemsConnectedToTrack( *track );
|
||||
|
|
Loading…
Reference in New Issue