diff --git a/eeschema/edit_bitmap.cpp b/eeschema/edit_bitmap.cpp index fb3db8427a..aa0b786ca7 100644 --- a/eeschema/edit_bitmap.cpp +++ b/eeschema/edit_bitmap.cpp @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2011 jean-pierre.charras - * Copyright (C) 2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2012 jean-pierre.charras + * Copyright (C) 2012 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -27,20 +27,12 @@ */ #include -#include -#include #include -#include -#include -#include #include -#include #include #include -#include - static void abortMoveBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { @@ -70,7 +62,8 @@ static void abortMoveBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) // Never delete existing item, because it can be referenced by an undo/redo command // Just restore its data - swap( *item, *olditem ); + item->SwapData( olditem ); + parent->SetUndoItem( NULL ); } screen->SetCurItem( item ); diff --git a/eeschema/sch_bitmap.cpp b/eeschema/sch_bitmap.cpp index 452af7162d..49a4a1c9ec 100644 --- a/eeschema/sch_bitmap.cpp +++ b/eeschema/sch_bitmap.cpp @@ -27,19 +27,11 @@ */ #include -#include -#include #include #include -#include -#include - #include -#include #include -#include - #include