PCBNew locate pad code refactoring and other minor fixes.

* Refactor pad locate code into the appropriate object.
* Dead code removal.
* Lots of coding style policy fixes.
This commit is contained in:
Wayne Stambaugh
2011-09-15 13:58:35 -04:00
parent 3d7c91af44
commit ae84ca2ffa
20 changed files with 829 additions and 1078 deletions
+16
View File
@@ -819,6 +819,22 @@ D_PAD* MODULE::FindPadByName( const wxString& aPadName ) const
}
D_PAD* MODULE::GetPad( const wxPoint& aPosition, int aLayerMask )
{
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
{
/* ... and on the correct layer. */
if( ( pad->m_layerMask & aLayerMask ) == 0 )
continue;
if( pad->HitTest( aPosition ) )
return pad;
}
return NULL;
}
// see class_module.h
SEARCH_RESULT MODULE::Visit( INSPECTOR* inspector, const void* testData,
const KICAD_T scanTypes[] )