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:
Martin Berglund 2024-01-24 00:24:16 +00:00 committed by Seth Hillbrand
parent ea7176d466
commit ddc2092dac
1 changed files with 7 additions and 13 deletions

View File

@ -194,23 +194,17 @@ 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 );
if( !field->IsVisible() || !field->CanAutoplace() )
{
continue;
}
for( SCH_FIELD* field : visibleFields )
{
if( field->CanAutoplace() )
{
if( m_symbol->GetTransform().y1 )
field->SetTextAngle( ANGLE_VERTICAL );
else
field->SetTextAngle( ANGLE_HORIZONTAL );
}
BOX2I bbox = field->GetBoundingBox();
int field_width = bbox.GetWidth();