Commit ab36d235 authored by jean-pierre charras's avatar jean-pierre charras

Pcbnew: fix issue in modedit, undo command: moved fields were not drawn afetr...

Pcbnew: fix issue in modedit, undo command: moved fields were not drawn afetr undo (due to incorrect flags state)
Fix incorrect initialization of lib names column in EDA_LIST_DIALOG. (Only the row 0 was initialized)
parent c6d7ee7e
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * 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 <dick@softplc.com>
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * 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, ...@@ -201,9 +202,9 @@ void EDA_LIST_DIALOG::InsertItems( const std::vector< wxArrayString >& itemList,
{ {
wxASSERT( (int) itemList[row].GetCount() == m_listBox->GetColumnCount() ); wxASSERT( (int) itemList[row].GetCount() == m_listBox->GetColumnCount() );
long itemIndex = 0;
for( unsigned col = 0; col < itemList[row].GetCount(); col++ ) for( unsigned col = 0; col < itemList[row].GetCount(); col++ )
{ {
long itemIndex = 0;
if( col == 0 ) if( col == 0 )
{ {
......
...@@ -30,10 +30,17 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, ...@@ -30,10 +30,17 @@ void FOOTPRINT_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem,
lastcmd->PushItem( wrapper ); lastcmd->PushItem( wrapper );
GetScreen()->PushCommandToUndoList( lastcmd ); GetScreen()->PushCommandToUndoList( lastcmd );
/* Clear current flags (which can be temporary set by a current edit command) */ /* Clear current flags (which can be temporary set by a current edit command) */
for( item = CopyItem->GraphicalItems(); item != NULL; item = item->Next() ) for( item = CopyItem->GraphicalItems(); item != NULL; item = item->Next() )
item->ClearFlags(); 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 */ /* Clear redo list, because after new save there is no redo to do */
GetScreen()->ClearUndoORRedoList( GetScreen()->m_RedoList ); GetScreen()->ClearUndoORRedoList( GetScreen()->m_RedoList );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment