From ee14da3093858ab9eee1a17f02e1f3488b0c797c Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 4 Apr 2019 09:48:57 -0400 Subject: [PATCH] Minor schematic formatter fix. Apparently at some point in KiCad's development, a '~' character was prefixed to the symbol name to indicate that it was not visible. The visibility state is now saved in the name field so remove the prefix. The parser was kept unchanged. Fixes lp:1632048 https://bugs.launchpad.net/kicad/+bug/1632048 --- eeschema/sch_legacy_plugin.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 3ba1228941..6aac875062 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/eeschema/sch_legacy_plugin.cpp @@ -3638,15 +3638,7 @@ void SCH_LEGACY_PLUGIN_CACHE::SaveSymbol( LIB_PART* aSymbol, // Save data aFormatter.Print( 0, "DEF" ); - - if( value.IsVisible() ) - { - aFormatter.Print( 0, " %s", TO_UTF8( value.GetText() ) ); - } - else - { - aFormatter.Print( 0, " ~%s", TO_UTF8( value.GetText() ) ); - } + aFormatter.Print( 0, " %s", TO_UTF8( value.GetText() ) ); LIB_FIELD& reference = aSymbol->GetReferenceField(); @@ -3660,11 +3652,11 @@ void SCH_LEGACY_PLUGIN_CACHE::SaveSymbol( LIB_PART* aSymbol, } aFormatter.Print( 0, " %d %d %c %c %d %c %c\n", - 0, aSymbol->GetPinNameOffset(), - aSymbol->ShowPinNumbers() ? 'Y' : 'N', - aSymbol->ShowPinNames() ? 'Y' : 'N', - aSymbol->GetUnitCount(), aSymbol->UnitsLocked() ? 'L' : 'F', - aSymbol->IsPower() ? 'P' : 'N' ); + 0, aSymbol->GetPinNameOffset(), + aSymbol->ShowPinNumbers() ? 'Y' : 'N', + aSymbol->ShowPinNames() ? 'Y' : 'N', + aSymbol->GetUnitCount(), aSymbol->UnitsLocked() ? 'L' : 'F', + aSymbol->IsPower() ? 'P' : 'N' ); timestamp_t dateModified = aSymbol->GetDateLastEdition();