Fix undo of pin edit.
Undo stashing must happen before modifications. Fixes: lp:1750401 * https://bugs.launchpad.net/kicad/+bug/1750401
This commit is contained in:
parent
0e493a3f91
commit
4b01c9e04e
|
@ -170,6 +170,9 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
|
|||
LastPinCommonUnit = dlg.GetAddToAllParts();
|
||||
LastPinVisible = dlg.GetVisible();
|
||||
|
||||
if( !pin->InEditMode() )
|
||||
SaveCopyInUndoList( pin->GetParent() );
|
||||
|
||||
pin->EnableEditMode( true, SynchronizePins()? false : true );
|
||||
pin->SetName( dlg.GetPinName() );
|
||||
pin->SetNameTextSize( GetLastPinNameSize() );
|
||||
|
@ -187,9 +190,6 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
|
|||
|
||||
if( pin->IsModified() || pin->IsNew() )
|
||||
{
|
||||
if( !pin->InEditMode() )
|
||||
SaveCopyInUndoList( pin->GetParent() );
|
||||
|
||||
OnModify( );
|
||||
|
||||
MSG_PANEL_ITEMS items;
|
||||
|
|
Loading…
Reference in New Issue