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:
Jeff Young 2023-08-31 11:36:07 +01:00
parent 09490e1f46
commit 9bcb6f0adf
3 changed files with 8 additions and 5 deletions

View File

@ -482,6 +482,10 @@ 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( "" );
// All units, but only a single De Morgan variant.
if( symbol->HasConversion() )
symbol->GetPins( temp_pins, 0, 1 );
else
symbol->GetPins( temp_pins ); symbol->GetPins( temp_pins );
m_fp_sel_ctrl->FilterByPinCount( temp_pins.size() ); m_fp_sel_ctrl->FilterByPinCount( temp_pins.size() );

View File

@ -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 ) ) 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;
@ -1276,6 +1276,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;

View File

@ -30,8 +30,6 @@
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:
/// This has no dependencies on calling wxFrame derivative, such as PCB_BASE_FRAME. /// This has no dependencies on calling wxFrame derivative, such as PCB_BASE_FRAME.
DIALOG_GRID_SETTINGS( EDA_DRAW_FRAME* aParent ); DIALOG_GRID_SETTINGS( EDA_DRAW_FRAME* aParent );