Eeschema: Autoplace fields offset correction
No longer count fields without 'Allow automatic placement' toward the Autoplace offset. Fixes https://gitlab.com/kicad/code/kicad/issues/16588
This commit is contained in:
parent
ea7176d466
commit
ddc2092dac
|
@ -194,24 +194,18 @@ protected:
|
|||
int max_field_width = 0;
|
||||
int total_height = 0;
|
||||
|
||||
std::vector<SCH_FIELD*> visibleFields;
|
||||
|
||||
for( SCH_FIELD* field : m_fields )
|
||||
{
|
||||
if( field->IsVisible() )
|
||||
visibleFields.push_back( field );
|
||||
}
|
||||
|
||||
for( SCH_FIELD* field : visibleFields )
|
||||
{
|
||||
if( field->CanAutoplace() )
|
||||
if( !field->IsVisible() || !field->CanAutoplace() )
|
||||
{
|
||||
if( m_symbol->GetTransform().y1 )
|
||||
field->SetTextAngle( ANGLE_VERTICAL );
|
||||
else
|
||||
field->SetTextAngle( ANGLE_HORIZONTAL );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( m_symbol->GetTransform().y1 )
|
||||
field->SetTextAngle( ANGLE_VERTICAL );
|
||||
else
|
||||
field->SetTextAngle( ANGLE_HORIZONTAL );
|
||||
|
||||
BOX2I bbox = field->GetBoundingBox();
|
||||
int field_width = bbox.GetWidth();
|
||||
int field_height = bbox.GetHeight();
|
||||
|
|
Loading…
Reference in New Issue