Unescape value fields when pasting from legacy schematics.
Fixes https://gitlab.com/kicad/code/kicad/issues/11124
This commit is contained in:
parent
ced1e68ea1
commit
ec44dfa60f
|
@ -1476,8 +1476,13 @@ void SCH_EDITOR_CONTROL::updatePastedSymbol( SCH_SYMBOL* aSymbol, SCH_SCREEN* aP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Pasted from notepad or an older instance of eeschema.
|
// Some legacy versions saved value fields escaped. While we still do in the symbol
|
||||||
// Use the values in the fields instead
|
// editor, we don't anymore in the schematic, so be sure to unescape them.
|
||||||
|
SCH_FIELD* valueField = aSymbol->GetField( VALUE_FIELD );
|
||||||
|
valueField->SetText( UnescapeString( valueField->GetText() ) );
|
||||||
|
|
||||||
|
// Pasted from notepad or an older instance of eeschema. Use the values in the fields
|
||||||
|
// instead.
|
||||||
reference = aSymbol->GetField( REFERENCE_FIELD )->GetText();
|
reference = aSymbol->GetField( REFERENCE_FIELD )->GetText();
|
||||||
value = aSymbol->GetField( VALUE_FIELD )->GetText();
|
value = aSymbol->GetField( VALUE_FIELD )->GetText();
|
||||||
footprint = aSymbol->GetField( FOOTPRINT_FIELD )->GetText();
|
footprint = aSymbol->GetField( FOOTPRINT_FIELD )->GetText();
|
||||||
|
|
Loading…
Reference in New Issue