Symbol Library Editor: save anchor position when modified

OnModify() stores the edited symbol in its edit buffer, therefore it has
to be called after a modification.

Fixes: lp:1744540
* https://bugs.launchpad.net/kicad/+bug/1744540
This commit is contained in:
Maciej Suminski 2018-01-23 14:03:57 +01:00
parent 2d3ef0fa6e
commit cbf433fe04
1 changed files with 3 additions and 5 deletions

View File

@ -219,18 +219,16 @@ void LIB_EDIT_FRAME::SaveOneSymbol()
void LIB_EDIT_FRAME::PlaceAnchor()
{
if( LIB_PART* part = GetCurPart() )
if( LIB_PART* part = GetCurPart() )
{
const wxPoint& cross_hair = GetCrossHairPosition();
wxPoint offset( -cross_hair.x, cross_hair.y );
OnModify( );
part->SetOffset( offset );
OnModify();
// Redraw the symbol
RedrawScreen( wxPoint( 0 , 0 ), true );
RedrawScreen( wxPoint( 0, 0 ), true );
m_canvas->Refresh();
}
}