From 3da2c8f9efbb091953ef29133fe2bbeba8da65c9 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 5 Jan 2025 14:23:41 +0000 Subject: [PATCH] Don't open-code copying of SCH_FIELDs. (It won't get updated when new stuff is added.) --- eeschema/symbol_editor/symbol_edit_frame.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index b3a384eb19..ab006d5ea3 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -1743,11 +1743,7 @@ void SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic( SCH_SYMBOL* aSymbol ) VECTOR2I pos = field.GetPosition() - aSymbol->GetPosition(); SCH_FIELD libField( symbol.get(), field.GetId() ); - if( i >= MANDATORY_FIELDS && !field.GetName( false ).IsEmpty() ) - libField.SetName( field.GetName( false ) ); - - libField.SetText( field.GetText() ); - libField.SetAttributes( field ); + libField = field; // The inverse transform is mirroring before, rotate after switch( mirror )