diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 7111cfea8e..49b3ab3b7c 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -427,6 +427,21 @@ COLOR4D SCH_FIELD::GetFieldColor() const } +void SCH_FIELD::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aCount = 2; + + switch( m_id ) + { + case REFERENCE_FIELD: aLayers[0] = LAYER_REFERENCEPART; break; + case VALUE_FIELD: aLayers[0] = LAYER_VALUEPART; break; + default: aLayers[0] = LAYER_FIELDS; break; + } + + aLayers[1] = LAYER_SELECTION_SHADOWS; +} + + EDA_ANGLE SCH_FIELD::GetDrawRotation() const { // Calculate the text orientation according to the symbol orientation. diff --git a/eeschema/sch_field.h b/eeschema/sch_field.h index a4e3106efa..b27f40d2f2 100644 --- a/eeschema/sch_field.h +++ b/eeschema/sch_field.h @@ -144,6 +144,8 @@ public: m_lastResolvedColor = aField->m_lastResolvedColor; } + void ViewGetLayers( int aLayers[], int& aCount ) const override; + /** * Adjusters to allow EDA_TEXT to draw/print/etc. text in absolute coords. */