Don't dim SCH_FIELDs when selecting them.

(They were only getting drawn on top of the selection shadow when
drawn by their parent symbol because LIB_FIELD was correctly
setting the view layers but SCH_FIELD was not.)

(cherry picked from commit 2300b0d2a3)
This commit is contained in:
Jeff Young 2023-06-01 12:12:48 +01:00
parent ec4faad589
commit 6d996e31b8
2 changed files with 17 additions and 0 deletions

View File

@ -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.

View File

@ -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.
*/