fixed libedit regression
This commit is contained in:
commit
84ce064e3b
|
@ -1005,7 +1005,9 @@ void LIB_COMPONENT::SetFields( const std::vector <LIB_FIELD>& aFields )
|
||||||
drawings.push_back( field );
|
drawings.push_back( field );
|
||||||
}
|
}
|
||||||
|
|
||||||
drawings.sort(); // would be nice to know why...
|
// Reorder drawings: transparent polygons first, pins and text last.
|
||||||
|
// so texts have priority on sreen.
|
||||||
|
drawings.sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -263,6 +263,9 @@ An alias %s already exists!\nCannot update this component" ),
|
||||||
// copy all the fields back, fully replacing any previous fields
|
// copy all the fields back, fully replacing any previous fields
|
||||||
m_LibEntry->SetFields( m_FieldsBuf );
|
m_LibEntry->SetFields( m_FieldsBuf );
|
||||||
|
|
||||||
|
// We need to keep the name and the value the same at the moment!
|
||||||
|
SetName(m_LibEntry->GetValueField().m_Text);
|
||||||
|
|
||||||
m_Parent->OnModify( );
|
m_Parent->OnModify( );
|
||||||
|
|
||||||
EndModal( 0 );
|
EndModal( 0 );
|
||||||
|
@ -734,11 +737,11 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField()
|
||||||
else
|
else
|
||||||
field.m_Bold = false;
|
field.m_Bold = false;
|
||||||
|
|
||||||
field.m_Pos.x = ReturnValueFromString( g_UserUnit, posXTextCtrl->GetValue(),
|
field.m_Pos.x = ReturnValueFromString( g_UserUnit, posXTextCtrl->GetValue(),
|
||||||
EESCHEMA_INTERNAL_UNIT );
|
EESCHEMA_INTERNAL_UNIT );
|
||||||
field.m_Pos.y = ReturnValueFromString( g_UserUnit, posYTextCtrl->GetValue(),
|
field.m_Pos.y = ReturnValueFromString( g_UserUnit, posYTextCtrl->GetValue(),
|
||||||
EESCHEMA_INTERNAL_UNIT );
|
EESCHEMA_INTERNAL_UNIT );
|
||||||
|
|
||||||
// Note: the Y axis for components in lib is from bottom to top
|
// Note: the Y axis for components in lib is from bottom to top
|
||||||
// and the screen axis is top to bottom: we must change the y coord sign for editing
|
// and the screen axis is top to bottom: we must change the y coord sign for editing
|
||||||
NEGATE( field.m_Pos.y );
|
NEGATE( field.m_Pos.y );
|
||||||
|
|
|
@ -19,20 +19,21 @@
|
||||||
<xsl:text>.HEA&nl;</xsl:text>
|
<xsl:text>.HEA&nl;</xsl:text>
|
||||||
<xsl:apply-templates select="design/date"/> <!-- Generate line .TIM <time> -->
|
<xsl:apply-templates select="design/date"/> <!-- Generate line .TIM <time> -->
|
||||||
<xsl:apply-templates select="design/tool"/> <!-- Generate line .APP <eeschema version> -->
|
<xsl:apply-templates select="design/tool"/> <!-- Generate line .APP <eeschema version> -->
|
||||||
|
<xsl:text>&nl;</xsl:text>
|
||||||
<xsl:apply-templates select="components/comp"/> <!-- Generate list of components -->
|
<xsl:apply-templates select="components/comp"/> <!-- Generate list of components -->
|
||||||
<xsl:text>&nl;&nl;</xsl:text>
|
<xsl:text>&nl;&nl;</xsl:text>
|
||||||
<xsl:apply-templates select="nets/net"/> <!-- Generate list of nets and connections -->
|
<xsl:apply-templates select="nets/net"/> <!-- Generate list of nets and connections -->
|
||||||
<xsl:text>&nl;.END&nl;</xsl:text>
|
<xsl:text>&nl;.END&nl;</xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Generate line .TIM 20/08/2010 10:45:33 -->
|
<!-- Generate line .APP "eeschema (2010-08-17 BZR 2450)-unstable" -->
|
||||||
<xsl:template match="tool">
|
<xsl:template match="tool">
|
||||||
<xsl:text>.APP "</xsl:text>
|
<xsl:text>.APP "</xsl:text>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
<xsl:text>"&nl;</xsl:text>
|
<xsl:text>"&nl;</xsl:text>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- Generate line .APP "eeschema (2010-08-17 BZR 2450)-unstable" -->
|
<!-- Generate line .TIM 20/08/2010 10:45:33 -->
|
||||||
<xsl:template match="date">
|
<xsl:template match="date">
|
||||||
<xsl:text>.TIM </xsl:text>
|
<xsl:text>.TIM </xsl:text>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
@ -40,6 +41,10 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- for each component -->
|
<!-- for each component -->
|
||||||
|
<!-- create lines like
|
||||||
|
.ADD_COM U3 "74LS541" (when no footprint name specified)
|
||||||
|
.ADD_COM JP1 "CONN_8X2" "pin_array_8x2" "pin_array_8x2" (with a specified footprint name)
|
||||||
|
-->
|
||||||
<xsl:template match="comp">
|
<xsl:template match="comp">
|
||||||
<xsl:text>.ADD_COM </xsl:text>
|
<xsl:text>.ADD_COM </xsl:text>
|
||||||
<xsl:value-of select="@ref"/>
|
<xsl:value-of select="@ref"/>
|
||||||
|
@ -56,6 +61,13 @@
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!-- for each net -->
|
<!-- for each net -->
|
||||||
|
<!-- create lines like
|
||||||
|
.ADD_TER U3.9 "/PC-RST"
|
||||||
|
.TER U3.8
|
||||||
|
BUS1.2
|
||||||
|
.ADD_TER BUS1.14 "/PC-IOR"
|
||||||
|
.TER U3.7
|
||||||
|
-->
|
||||||
<xsl:template match="net">
|
<xsl:template match="net">
|
||||||
<!-- nets are output only if there is more than one pin in net -->
|
<!-- nets are output only if there is more than one pin in net -->
|
||||||
<xsl:if test="count(node)>1">
|
<xsl:if test="count(node)>1">
|
||||||
|
|
Loading…
Reference in New Issue