Remove leading/trailing white space error message from field validator.

The illegal white space testing for reference and value (library editor
only) fields are adequate to ensure the user cannot enter invalid white
space characters.  Leading and/or trailing white space should not be an
issue for field storage in the schematic file as they are quoted.  Rather
than silently removing the leading and/or trailing white space which is
frowned upon, let the user fix it.

Fixes lp:1659526

https://bugs.launchpad.net/kicad/+bug/1659526
This commit is contained in:
Wayne Stambaugh 2017-07-13 13:45:25 -04:00
parent 133cb01f79
commit aba04c6ec5
1 changed files with 1 additions and 6 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2016 Wayne Stambaugh, stambaughw@gmail.com
* Copyright (C) 2016 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2016-2017 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -126,11 +126,6 @@ bool SCH_FIELD_VALIDATOR::Validate( wxWindow *aParent )
errorMsg.Printf( _( "The %s field cannot contain %s characters." ), fieldName, badChars );
}
else if( (tmp.Trim().Length() != val.Length()) || (tmp.Trim( false ).Length() != val.Length()) )
{
errorMsg.Printf( _( "The %s field cannot contain leading and/or trailing white space." ),
fieldName );
}
if ( !errorMsg.empty() )
{