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
This commit is contained in:
parent
09288ecbe2
commit
cb003d8ab4
|
@ -486,7 +486,11 @@ void DIALOG_CHOOSE_SYMBOL::PopulateFootprintSelector( LIB_ID const& aLibId )
|
||||||
LIB_FIELD* fp_field = symbol->GetFieldById( FOOTPRINT_FIELD );
|
LIB_FIELD* fp_field = symbol->GetFieldById( FOOTPRINT_FIELD );
|
||||||
wxString fp_name = fp_field ? fp_field->GetFullText() : wxString( "" );
|
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->FilterByPinCount( temp_pins.size() );
|
||||||
m_fp_sel_ctrl->FilterByFootprintFilters( symbol->GetFPFilters(), true );
|
m_fp_sel_ctrl->FilterByFootprintFilters( symbol->GetFPFilters(), true );
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ void LIB_SYMBOL::GetPins( LIB_PINS& aList, int aUnit, int aConvert ) const
|
||||||
* when m_convert == 0, the body item is common to shapes
|
* 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;
|
const LIB_ITEMS_CONTAINER& drawItems = parent ? parent->m_drawings : m_drawings;
|
||||||
|
|
||||||
for( const LIB_ITEM& item : drawItems[LIB_PIN_T] )
|
for( const LIB_ITEM& item : drawItems[LIB_PIN_T] )
|
||||||
|
@ -1015,7 +1015,7 @@ void LIB_SYMBOL::GetPins( LIB_PINS& aList, int aUnit, int aConvert ) const
|
||||||
if( aUnit && item.m_unit && ( item.m_unit != aUnit ) )
|
if( aUnit && item.m_unit && ( item.m_unit != aUnit ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Shape filtering:
|
// De Morgan variant filtering:
|
||||||
if( aConvert && item.m_convert && ( item.m_convert != aConvert ) )
|
if( aConvert && item.m_convert && ( item.m_convert != aConvert ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1470,6 +1470,7 @@ bool LIB_SYMBOL::HasConversion() const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int LIB_SYMBOL::GetMaxPinNumber() const
|
int LIB_SYMBOL::GetMaxPinNumber() const
|
||||||
{
|
{
|
||||||
int maxPinNumber = 0;
|
int maxPinNumber = 0;
|
||||||
|
|
|
@ -32,8 +32,6 @@ struct GRID;
|
||||||
|
|
||||||
class DIALOG_GRID_SETTINGS : public DIALOG_GRID_SETTINGS_BASE
|
class DIALOG_GRID_SETTINGS : public DIALOG_GRID_SETTINGS_BASE
|
||||||
{
|
{
|
||||||
EDA_DRAW_FRAME* m_parent;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DIALOG_GRID_SETTINGS( wxWindow* aParent, wxWindow* aEventSource, UNITS_PROVIDER* aProvider,
|
DIALOG_GRID_SETTINGS( wxWindow* aParent, wxWindow* aEventSource, UNITS_PROVIDER* aProvider,
|
||||||
GRID& aGrid );
|
GRID& aGrid );
|
||||||
|
|
Loading…
Reference in New Issue