From 86650987576c74c2e44096212ae8bbd733c9d96c Mon Sep 17 00:00:00 2001 From: Thomas Pointhuber Date: Wed, 28 Oct 2020 10:21:37 +0100 Subject: [PATCH] Don't write translated strings from the plugin cache Followup for b7f115bf5f3ef629655a52141d29f4ec35113cd6 --- eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp index df9d45873d..7c837e9e65 100644 --- a/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp +++ b/eeschema/sch_plugins/kicad/sch_sexpr_plugin.cpp @@ -1836,8 +1836,13 @@ void SCH_SEXPR_PLUGIN_CACHE::saveField( LIB_FIELD* aField, { wxCHECK_RET( aField && aField->Type() == LIB_FIELD_T, "Invalid LIB_FIELD object." ); + wxString fieldName = aField->GetName(); + + if( aField->GetId() >= 0 && aField->GetId() < MANDATORY_FIELDS ) + fieldName = TEMPLATE_FIELDNAME::GetDefaultFieldName( aField->GetId(), false ); + aFormatter.Print( aNestLevel, "(property %s %s (id %d) (at %s %s %g)\n", - aFormatter.Quotew( aField->GetName() ).c_str(), + aFormatter.Quotew( fieldName ).c_str(), aFormatter.Quotew( aField->GetText() ).c_str(), aField->GetId(), FormatInternalUnits( aField->GetPosition().x ).c_str(),