Fix Eagle schematic importer incorrect symbol value field and visibility.
Also fix a crash if an XML_PARSER_ERROR exception is thrown when importing
Eagle symbol libraries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18232
(cherry picked from commit 566fefafc5
)
This commit is contained in:
parent
4e3488c2e0
commit
4ee1415164
|
@ -1951,11 +1951,8 @@ void SCH_IO_EAGLE::loadInstance( const std::unique_ptr<EINSTANCE>& aInstance,
|
|||
// Use the instance attribute to determine the reference and value field visibility.
|
||||
if( aInstance->smashed && aInstance->smashed.Get() )
|
||||
{
|
||||
if( !valueAttributeFound )
|
||||
symbol->GetField( VALUE_FIELD )->SetVisible( false );
|
||||
|
||||
if( !nameAttributeFound )
|
||||
symbol->GetField( REFERENCE_FIELD )->SetVisible( false );
|
||||
symbol->GetField( VALUE_FIELD )->SetVisible( valueAttributeFound );
|
||||
symbol->GetField( REFERENCE_FIELD )->SetVisible( nameAttributeFound );
|
||||
}
|
||||
|
||||
symbol->AddHierarchicalReference( m_sheetPath.Path(), reference, unit );
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <wx/filename.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <string_utils.h>
|
||||
#include <io/eagle/eagle_parser.h>
|
||||
|
||||
|
||||
void SYMBOL_EDIT_FRAME::ImportSymbol()
|
||||
|
|
Loading…
Reference in New Issue