From fd0a3348ea00b5c05a6a2eef8230d18139a1adb6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Dec 2013 15:11:12 +0100 Subject: [PATCH] More elegant way of handling interruption of current modifications. --- pcbnew/tools/edit_tool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index a51d9dccf9..f1f7c75f0b 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -148,8 +148,8 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) if( restore ) { // Modifications has to be rollbacked, so restore the previous state of items - wxCommandEvent dummy; - editFrame->GetBoardFromUndoList( dummy ); + wxCommandEvent undoEvent( wxEVT_TOOL, wxID_UNDO ); + wxPostEvent( editFrame, undoEvent ); } else {