From 7551613826e587f2b6787119bde9420d1ec554a4 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 22 Jan 2019 07:35:36 -0800 Subject: [PATCH] pcbnew: Don't duplicate TOOL_EVENT There is some odd interaction in the default copy constructor for TOOL_EVENT using boost::optional under gcc. Avoid this by explicitly constructing the event needed for cut Fixes: lp:1812848 * https://bugs.launchpad.net/kicad/+bug/1812848 --- pcbnew/tools/edit_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 8c3fe63755..808f410056 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -1553,7 +1553,7 @@ int EDIT_TOOL::cutToClipboard( const TOOL_EVENT& aEvent ) // N.B. Setting the CUT flag prevents lock filtering as we only want to delete the items that // were copied to the clipboard, no more, no fewer. Filtering for locked item, if any will be done // in the copyToClipboard() routine - TOOL_EVENT evt = aEvent; + TOOL_EVENT evt( aEvent.Category(), aEvent.Action(), TOOL_ACTION_SCOPE::AS_GLOBAL ); evt.SetParameter( PCB_ACTIONS::REMOVE_FLAGS::CUT ); Remove( evt ); }