kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #05227
Template fields bugfix patch
Hi,
Drawing component fields originating from templates crashes eeschema due to
a null parent issue. The attached patch fixes that.
Regards,
Marco
=== modified file 'eeschema/dialog_edit_component_in_schematic.cpp'
--- eeschema/dialog_edit_component_in_schematic.cpp 2010-07-12 14:07:09 +0000
+++ eeschema/dialog_edit_component_in_schematic.cpp 2010-08-28 16:51:20 +0000
@@ -448,7 +448,7 @@
for( TEMPLATE_FIELDNAMES::const_iterator it = tfnames.begin(); it!=tfnames.end(); ++it )
{
// add a new field unconditionally to the UI only
- SCH_FIELD fld( wxPoint(0,0), -1 /* id is a relic */, NULL, it->m_Name );
+ SCH_FIELD fld( wxPoint(0,0), -1 /* id is a relic */, m_Cmp, it->m_Name );
// See if field by same name already exists in component.
SCH_FIELD* schField = aComponent->FindField( it->m_Name );
Follow ups