Try to fix bug 639683 : Illegal reference strings are now detected and replaced by default prefix for old schematics or rejected in schematic edition.

This commit is contained in:
jean-pierre charras
2011-05-31 18:29:14 +02:00
parent bb6f5625bd
commit 9092dd0aec
6 changed files with 94 additions and 12 deletions
+10 -3
View File
@@ -179,11 +179,18 @@ create a new power component with the new value." ), GetChars( entry->GetName()
aField->m_Size.x = aField->m_Size.y = m_TextFieldSize;
}
aField->m_Text = newtext;
if( fieldNdx == REFERENCE )
{
component->SetRef( GetSheet(), newtext );
// Test is reference is acceptable:
if( SCH_COMPONENT::IsReferenceStringValid( newtext ) )
{
component->SetRef( GetSheet(), newtext );
aField->m_Text = newtext;
}
else
{
DisplayError( this, _( "Illegal reference string! No change" ) );
}
}
}
else