Resolve text when requested
Getting resolved text for a symbol should always happen, even if we have
unresolved data in the instances
Fixes https://gitlab.com/kicad/code/kicad/issues/11003
(cherry picked from commit acb5ce7108
)
This commit is contained in:
parent
495b42c39f
commit
ac87d5e940
|
@ -583,8 +583,15 @@ const wxString SCH_SYMBOL::GetValue( const SCH_SHEET_PATH* sheet, bool aResolve
|
||||||
{
|
{
|
||||||
if( instance.m_Path == path && !instance.m_Value.IsEmpty() )
|
if( instance.m_Path == path && !instance.m_Value.IsEmpty() )
|
||||||
{
|
{
|
||||||
// This can only be an override from an Update Schematic from PCB, and therefore
|
// This can only be overridden by a new value but if we are resolving,
|
||||||
// will always be fully resolved.
|
// make sure that the symbol returns the fully resolved text
|
||||||
|
if( aResolve )
|
||||||
|
{
|
||||||
|
SCH_SYMBOL new_sym( *this );
|
||||||
|
new_sym.GetField( VALUE_FIELD )->SetText( instance.m_Value );
|
||||||
|
return new_sym.GetField( VALUE_FIELD )->GetShownText();
|
||||||
|
}
|
||||||
|
|
||||||
return instance.m_Value;
|
return instance.m_Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue