diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 1a80bd5a9c..6756e10a9d 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -24,6 +24,7 @@ #include "common_actions.h" #include +#include // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", @@ -42,8 +43,8 @@ TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveEdit.flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ); -TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.delete", - AS_GLOBAL, 127, // 127 stands for DELETE key +TOOL_ACTION COMMON_ACTIONS::remove( "pcbnew.InteractiveEdit.remove", + AS_GLOBAL, WXK_DELETE, "Remove", "Deletes selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index f1f7c75f0b..99f44b9dfb 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -112,6 +112,11 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent ) // Flip causes change of layers enableUpdateFlag( KIGFX::VIEW_ITEM::LAYERS ); } + else if( evt->IsAction( &COMMON_ACTIONS::remove ) ) + { + Remove( aEvent ); + break; + } } else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) )