From 04d1d503eefd9b6b5f46f3971e7270732182c453 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 17 Feb 2018 13:50:23 +0000 Subject: [PATCH] Disallow '/' in labels. Fixes: lp:1749232 * https://bugs.launchpad.net/kicad/+bug/1749232 --- eeschema/dialogs/dialog_edit_label.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index 032cb9abab..06c6bfa911 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -181,11 +181,12 @@ void DIALOG_LABEL_EDITOR::InitDialog() m_textLabel = m_textLabelSingleLine; m_textLabelMultiLine->Show( false ); wxTextValidator* validator = (wxTextValidator*) m_textLabel->GetValidator(); - wxArrayString excludes; // Add invalid label characters to this list. - excludes.Add( wxT( " " ) ); - validator->SetExcludes( excludes ); + if( m_CurrentText->GetClass() == wxT( "SCH_LABEL" ) ) + validator->SetCharExcludes( wxT( " /" ) ); + else + validator->SetCharExcludes( wxT( " " ) ); } m_textLabel->SetValue( m_CurrentText->GetText() );