From a3a36ed4d62dc731c9d0860bd36261a299b35ceb Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 21 Aug 2020 23:07:23 +0100 Subject: [PATCH] Disallow text var references in reference designators.Disallow text var references in reference designators.Disallow text var references in reference designators.Disallow text var references in reference designators.Disallow text var references in reference designators.Disallow text var references in reference designators.Disallow text var references in reference designators.Disallow text var references in reference designators.Disallow text var references in reference designators. Fixes https://gitlab.com/kicad/code/kicad/issues/5293 --- eeschema/sch_validators.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/sch_validators.cpp b/eeschema/sch_validators.cpp index 078d299605..de46dba353 100644 --- a/eeschema/sch_validators.cpp +++ b/eeschema/sch_validators.cpp @@ -170,6 +170,10 @@ bool SCH_FIELD_VALIDATOR::Validate( wxWindow *aParent ) msg.Printf( fieldCharError, badChars ); } + else if( m_fieldId == REFERENCE && val.Contains( wxT( "${" ) ) ) + { + msg.Printf( _( "The reference designator cannot contain text variable references" ) ); + } if ( !msg.empty() ) {