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:
parent
2d3ef0fa6e
commit
cbf433fe04
|
@ -219,18 +219,16 @@ void LIB_EDIT_FRAME::SaveOneSymbol()
|
||||||
|
|
||||||
void LIB_EDIT_FRAME::PlaceAnchor()
|
void LIB_EDIT_FRAME::PlaceAnchor()
|
||||||
{
|
{
|
||||||
if( LIB_PART* part = GetCurPart() )
|
if( LIB_PART* part = GetCurPart() )
|
||||||
{
|
{
|
||||||
const wxPoint& cross_hair = GetCrossHairPosition();
|
const wxPoint& cross_hair = GetCrossHairPosition();
|
||||||
|
|
||||||
wxPoint offset( -cross_hair.x, cross_hair.y );
|
wxPoint offset( -cross_hair.x, cross_hair.y );
|
||||||
|
|
||||||
OnModify( );
|
|
||||||
|
|
||||||
part->SetOffset( offset );
|
part->SetOffset( offset );
|
||||||
|
OnModify();
|
||||||
|
|
||||||
// Redraw the symbol
|
// Redraw the symbol
|
||||||
RedrawScreen( wxPoint( 0 , 0 ), true );
|
RedrawScreen( wxPoint( 0, 0 ), true );
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue