kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #39909
[PATCH] Eeschema: place new field near parent component
For now fields created in Fields Editor are placed at
position (0, 0).
Every new field must be placed at the origin of
the parent component.
---
eeschema/dialogs/dialog_fields_editor_global.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eeschema/dialogs/dialog_fields_editor_global.cpp b/eeschema/dialogs/dialog_fields_editor_global.cpp
index dd2c9ae73..f68dc6d5c 100644
--- a/eeschema/dialogs/dialog_fields_editor_global.cpp
+++ b/eeschema/dialogs/dialog_fields_editor_global.cpp
@@ -604,7 +604,7 @@ public:
SCH_FIELD* destField = comp->FindField( srcName );
if( !destField && !srcValue.IsEmpty() )
- destField = comp->AddField( SCH_FIELD( wxPoint( 0, 0 ), -1, comp, srcName ) );
+ destField = comp->AddField( SCH_FIELD( comp->GetPosition(), -1, comp, srcName ) );
if( destField && !srcValue.IsEmpty() )
destField->SetText( srcValue );
--
2.21.0
Follow ups