Clear autoplaced flag when modifiying field orientation/justification

Fixes: lp:1743893
* https://bugs.launchpad.net/kicad/+bug/1743893
This commit is contained in:
Jon Evans 2018-01-17 21:51:48 -05:00 committed by Maciej Suminski
parent 7d821cb08c
commit 10b635ffe2
1 changed files with 19 additions and 0 deletions

View File

@ -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();
}
}