Dont duplicate items in sheet pin properties combo

Fixes https://gitlab.com/kicad/code/kicad/issues/7132
This commit is contained in:
Michael Kavanagh 2021-01-19 22:05:45 +00:00 committed by Jeff Young
parent 360953ba98
commit ab8bd8f8c7
1 changed files with 4 additions and 1 deletions

View File

@ -90,7 +90,10 @@ bool DIALOG_SHEET_PIN_PROPERTIES::TransferDataToWindow()
for( SCH_ITEM* item : screen->Items().OfType( SCH_HIER_LABEL_T ) )
{
m_comboName->Append( static_cast<SCH_HIERLABEL*>( item )->GetText() );
wxString txt = static_cast<SCH_HIERLABEL*>( item )->GetText();
if( m_comboName->FindString( txt, true ) == wxNOT_FOUND )
m_comboName->Append( txt );
}
m_comboName->SetValue( UnescapeString( m_sheetPin->GetText() ) );