Disallow '/' in labels.
Fixes: lp:1749232 * https://bugs.launchpad.net/kicad/+bug/1749232
This commit is contained in:
parent
5c6b19c55d
commit
04d1d503ee
|
@ -181,11 +181,12 @@ void DIALOG_LABEL_EDITOR::InitDialog()
|
||||||
m_textLabel = m_textLabelSingleLine;
|
m_textLabel = m_textLabelSingleLine;
|
||||||
m_textLabelMultiLine->Show( false );
|
m_textLabelMultiLine->Show( false );
|
||||||
wxTextValidator* validator = (wxTextValidator*) m_textLabel->GetValidator();
|
wxTextValidator* validator = (wxTextValidator*) m_textLabel->GetValidator();
|
||||||
wxArrayString excludes;
|
|
||||||
|
|
||||||
// Add invalid label characters to this list.
|
// Add invalid label characters to this list.
|
||||||
excludes.Add( wxT( " " ) );
|
if( m_CurrentText->GetClass() == wxT( "SCH_LABEL" ) )
|
||||||
validator->SetExcludes( excludes );
|
validator->SetCharExcludes( wxT( " /" ) );
|
||||||
|
else
|
||||||
|
validator->SetCharExcludes( wxT( " " ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_textLabel->SetValue( m_CurrentText->GetText() );
|
m_textLabel->SetValue( m_CurrentText->GetText() );
|
||||||
|
|
Loading…
Reference in New Issue