From 4b01c9e04e561217dd3c57f9265ce7567295aedb Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 19 Feb 2018 18:13:10 +0000 Subject: [PATCH] Fix undo of pin edit. Undo stashing must happen before modifications. Fixes: lp:1750401 * https://bugs.launchpad.net/kicad/+bug/1750401 --- eeschema/pinedit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index 375f3dc0c1..aeeee62791 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -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;