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 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();
|
||||
|
|
Loading…
Reference in New Issue