diff --git a/common/displlst.cpp b/common/displlst.cpp index f79715ff33..1717f2a0f8 100644 --- a/common/displlst.cpp +++ b/common/displlst.cpp @@ -1,7 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or @@ -201,9 +202,9 @@ void EDA_LIST_DIALOG::InsertItems( const std::vector< wxArrayString >& itemList, { wxASSERT( (int) itemList[row].GetCount() == m_listBox->GetColumnCount() ); + long itemIndex = 0; for( unsigned col = 0; col < itemList[row].GetCount(); col++ ) { - long itemIndex = 0; if( col == 0 ) { diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 5e1fc518cc..4f273eb3c7 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -30,10 +30,17 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, lastcmd->PushItem( wrapper ); GetScreen()->PushCommandToUndoList( lastcmd ); + /* Clear current flags (which can be temporary set by a current edit command) */ for( item = CopyItem->GraphicalItems(); item != NULL; item = item->Next() ) item->ClearFlags(); + for( D_PAD* pad = CopyItem->Pads(); pad; pad = pad->Next() ) + pad->ClearFlags(); + + CopyItem->Reference().ClearFlags(); + CopyItem->Value().ClearFlags(); + /* Clear redo list, because after new save there is no redo to do */ GetScreen()->ClearUndoORRedoList( GetScreen()->m_RedoList ); }