Add missing IsMandatory() fn

This commit is contained in:
Seth Hillbrand 2024-06-07 09:58:54 -07:00
parent 41ebd3c560
commit 76a68b1f8d
2 changed files with 11 additions and 0 deletions

View File

@ -1295,6 +1295,15 @@ VECTOR2I SCH_FIELD::GetParentPosition() const
}
bool SCH_FIELD::IsMandatory() const
{
if( m_parent && m_parent->Type() == SCH_SHEET_T )
return m_id >= 0 && m_id < SHEET_MANDATORY_FIELDS;
else
return m_id >= 0 && m_id < MANDATORY_FIELDS;
}
bool SCH_FIELD::operator <( const SCH_ITEM& aItem ) const
{
if( Type() != aItem.Type() )

View File

@ -209,6 +209,8 @@ public:
*/
void ImportValues( const LIB_FIELD& aSource );
bool IsMandatory() const;
int GetPenWidth() const override;
void ClearCaches() override;