Don't count pins of both De Morgan variants when matching to footprint pads.
(And remove un unused variable from grid settings dialog.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15550
(cherry picked from commit cb003d8ab4
)
This commit is contained in:
parent
09490e1f46
commit
9bcb6f0adf
|
@ -482,7 +482,11 @@ void DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector( LIB_ID const& aLibId )
|
|||
LIB_FIELD* fp_field = symbol->GetFieldById( FOOTPRINT_FIELD );
|
||||
wxString fp_name = fp_field ? fp_field->GetFullText() : wxString( "" );
|
||||
|
||||
symbol->GetPins( temp_pins );
|
||||
// All units, but only a single De Morgan variant.
|
||||
if( symbol->HasConversion() )
|
||||
symbol->GetPins( temp_pins, 0, 1 );
|
||||
else
|
||||
symbol->GetPins( temp_pins );
|
||||
|
||||
m_fp_sel_ctrl->FilterByPinCount( temp_pins.size() );
|
||||
m_fp_sel_ctrl->FilterByFootprintFilters( symbol->GetFPFilters(), true );
|
||||
|
|
|
@ -847,7 +847,7 @@ void LIB_SYMBOL::GetPins( LIB_PINS& aList, int aUnit, int aConvert ) const
|
|||
* when m_convert == 0, the body item is common to shapes
|
||||
*/
|
||||
|
||||
LIB_SYMBOL_SPTR parent = m_parent.lock();
|
||||
LIB_SYMBOL_SPTR parent = m_parent.lock();
|
||||
const LIB_ITEMS_CONTAINER& drawItems = parent ? parent->m_drawings : m_drawings;
|
||||
|
||||
for( const LIB_ITEM& item : drawItems[LIB_PIN_T] )
|
||||
|
@ -856,7 +856,7 @@ void LIB_SYMBOL::GetPins( LIB_PINS& aList, int aUnit, int aConvert ) const
|
|||
if( aUnit && item.m_unit && ( item.m_unit != aUnit ) )
|
||||
continue;
|
||||
|
||||
// Shape filtering:
|
||||
// De Morgan variant filtering:
|
||||
if( aConvert && item.m_convert && ( item.m_convert != aConvert ) )
|
||||
continue;
|
||||
|
||||
|
@ -1276,6 +1276,7 @@ bool LIB_SYMBOL::HasConversion() const
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
int LIB_SYMBOL::GetMaxPinNumber() const
|
||||
{
|
||||
int maxPinNumber = 0;
|
||||
|
|
|
@ -30,8 +30,6 @@
|
|||
|
||||
class DIALOG_GRID_SETTINGS : public DIALOG_GRID_SETTINGS_BASE
|
||||
{
|
||||
EDA_DRAW_FRAME* m_parent;
|
||||
|
||||
public:
|
||||
/// This has no dependencies on calling wxFrame derivative, such as PCB_BASE_FRAME.
|
||||
DIALOG_GRID_SETTINGS( EDA_DRAW_FRAME* aParent );
|
||||
|
|
Loading…
Reference in New Issue