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,23 +194,17 @@ protected:
|
||||||
int max_field_width = 0;
|
int max_field_width = 0;
|
||||||
int total_height = 0;
|
int total_height = 0;
|
||||||
|
|
||||||
std::vector<SCH_FIELD*> visibleFields;
|
|
||||||
|
|
||||||
for( SCH_FIELD* field : m_fields )
|
for( SCH_FIELD* field : m_fields )
|
||||||
{
|
{
|
||||||
if( field->IsVisible() )
|
if( !field->IsVisible() || !field->CanAutoplace() )
|
||||||
visibleFields.push_back( field );
|
{
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( SCH_FIELD* field : visibleFields )
|
|
||||||
{
|
|
||||||
if( field->CanAutoplace() )
|
|
||||||
{
|
|
||||||
if( m_symbol->GetTransform().y1 )
|
if( m_symbol->GetTransform().y1 )
|
||||||
field->SetTextAngle( ANGLE_VERTICAL );
|
field->SetTextAngle( ANGLE_VERTICAL );
|
||||||
else
|
else
|
||||||
field->SetTextAngle( ANGLE_HORIZONTAL );
|
field->SetTextAngle( ANGLE_HORIZONTAL );
|
||||||
}
|
|
||||||
|
|
||||||
BOX2I bbox = field->GetBoundingBox();
|
BOX2I bbox = field->GetBoundingBox();
|
||||||
int field_width = bbox.GetWidth();
|
int field_width = bbox.GetWidth();
|
||||||
|
|
Loading…
Reference in New Issue