7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Avoid cover types.

This commit is contained in:
Jeff Young 2024-07-22 11:46:36 +01:00
parent 6053113a8b
commit fcb104694b
6 changed files with 14 additions and 15 deletions

View File

@ -192,8 +192,8 @@ public:
PCB_FIELDS& Fields() { return m_fields; }
const PCB_FIELDS& Fields() const { return m_fields; }
PADS& Pads() { return m_pads; }
const PADS& Pads() const { return m_pads; }
std::deque<PAD*>& Pads() { return m_pads; }
const std::deque<PAD*>& Pads() const { return m_pads; }
DRAWINGS& GraphicalItems() { return m_drawings; }
const DRAWINGS& GraphicalItems() const { return m_drawings; }
@ -1016,7 +1016,7 @@ protected:
private:
PCB_FIELDS m_fields;
DRAWINGS m_drawings; // BOARD_ITEMs for drawings on the board, owned by pointer.
PADS m_pads; // PAD items, owned by pointer
std::deque<PAD*> m_pads; // PAD items, owned by pointer
ZONES m_zones; // PCB_ZONE items, owned by pointer
GROUPS m_groups; // PCB_GROUP items, owned by pointer

View File

@ -680,7 +680,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( FOOTPRINT* aFootprint
bool changed = false;
// At this point, the component footprint is updated. Now update the nets.
PADS pads = aFootprint->Pads();
std::deque<PAD*> pads = aFootprint->Pads();
std::set<wxString> padNetnames;
std::sort( pads.begin(), pads.end(),

View File

@ -1624,9 +1624,7 @@ int ROUTER_TOOL::RouteSelected( const TOOL_EVENT& aEvent )
{
if( item->Type() == PCB_FOOTPRINT_T )
{
const PADS& fpPads = ( static_cast<FOOTPRINT*>( item ) )->Pads();
for( PAD* pad : fpPads )
for( PAD* pad : static_cast<FOOTPRINT*>( item )->Pads() )
itemList.push_back( pad );
}
else if( dynamic_cast<BOARD_CONNECTED_ITEM*>( item ) != nullptr )

View File

@ -332,16 +332,17 @@ int PAD_TOOL::EnumeratePads( const TOOL_EVENT& aEvent )
frame()->PushTool( aEvent );
VECTOR2I oldCursorPos; // store the previous mouse cursor position, during mouse drag
std::list<PAD*> selectedPads;
BOARD_COMMIT commit( frame() );
bool isFirstPoint = true; // make sure oldCursorPos is initialized at least once
PADS pads = board()->GetFirstFootprint()->Pads();
VECTOR2I oldCursorPos; // store the previous mouse cursor position, during mouse drag
std::list<PAD*> selectedPads;
BOARD_COMMIT commit( frame() );
bool isFirstPoint = true; // make sure oldCursorPos is initialized at least once
std::deque<PAD*> pads = board()->GetFirstFootprint()->Pads();
MAGNETIC_SETTINGS mag_settings;
mag_settings.graphics = false;
mag_settings.tracks = MAGNETIC_OPTIONS::NO_EFFECT;
mag_settings.pads = MAGNETIC_OPTIONS::CAPTURE_ALWAYS;
PCB_GRID_HELPER grid( m_toolMgr, &mag_settings );
grid.SetSnap( true );

View File

@ -189,7 +189,7 @@ VECTOR2I PCB_GRID_HELPER::AlignToArc( const VECTOR2I& aPoint, const SHAPE_ARC& a
}
VECTOR2I PCB_GRID_HELPER::AlignToNearestPad( const VECTOR2I& aMousePos, PADS& aPads )
VECTOR2I PCB_GRID_HELPER::AlignToNearestPad( const VECTOR2I& aMousePos, std::deque<PAD*>& aPads )
{
clearAnchors();

View File

@ -64,7 +64,7 @@ public:
VECTOR2I AlignToArc ( const VECTOR2I& aPoint, const SHAPE_ARC& aSeg );
VECTOR2I AlignToNearestPad( const VECTOR2I& aMousePos, PADS& aPads );
VECTOR2I AlignToNearestPad( const VECTOR2I& aMousePos, std::deque<PAD*>& aPads );
/**
* Chooses the "best" snap anchor around the given point, optionally taking layers from