Browse Source

Clear autoplaced flag when modifiying field orientation/justification

Fixes: lp:1743893
* https://bugs.launchpad.net/kicad/+bug/1743893
pull/5/merge
Jon Evans 8 years ago
committed by Maciej Suminski
parent
commit
10b635ffe2
  1. 19
      eeschema/dialogs/dialog_edit_one_field.cpp

19
eeschema/dialogs/dialog_edit_one_field.cpp

@ -301,6 +301,25 @@ void DIALOG_SCH_EDIT_ONE_FIELD::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH*
component->SetRef( aSheetPath, m_text );
}
bool modified = false;
modified = ( modified ||
( ( aField->GetTextAngle() == TEXT_ANGLE_VERT ) != m_orientation ) );
modified = ( modified ||
( ( aField->GetHorizJustify() !=
IntToEdaTextHorizJustify( m_horizontalJustification - 1 ) ) ) );
modified = ( modified ||
( ( aField->GetVertJustify() !=
IntToEdaTextVertJustify( m_verticalJustification - 1 ) ) ) );
aField->SetText( m_text );
updateText( aField );
if( modified )
{
auto component = static_cast< SCH_COMPONENT* >( aField->GetParent() );
component->ClearFieldsAutoplaced();
}
}
Loading…
Cancel
Save