Ignore reference and value when computing "allChecked".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16408
This commit is contained in:
parent
1f627a3a75
commit
9910c670d2
|
@ -356,13 +356,22 @@ void DIALOG_CHANGE_SYMBOLS::updateFieldsList()
|
|||
|
||||
m_fieldsBox->GetCheckedItems( checkedItems );
|
||||
|
||||
for( int i : checkedItems )
|
||||
checkedNames.push_back( m_fieldsBox->GetString( i ) );
|
||||
for( int ii : checkedItems )
|
||||
checkedNames.push_back( m_fieldsBox->GetString( ii ) );
|
||||
|
||||
bool allChecked = checkedItems.size() == m_fieldsBox->GetCount();
|
||||
bool allChecked = true;
|
||||
|
||||
for( unsigned i = m_fieldsBox->GetCount() - 1; i >= MANDATORY_FIELDS; --i )
|
||||
m_fieldsBox->Delete( i );
|
||||
for( unsigned ii = 0; ii < m_fieldsBox->GetCount(); ++ii )
|
||||
{
|
||||
if( ii == REFERENCE_FIELD || ii == VALUE_FIELD )
|
||||
continue;
|
||||
|
||||
if( !m_fieldsBox->IsChecked( ii ) )
|
||||
allChecked = false;
|
||||
}
|
||||
|
||||
for( unsigned ii = m_fieldsBox->GetCount() - 1; ii >= MANDATORY_FIELDS; --ii )
|
||||
m_fieldsBox->Delete( ii );
|
||||
|
||||
for( const wxString& fieldName : fieldNames )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue