Commit f4de2877 authored by Maciej Suminski's avatar Maciej Suminski

Added possibility of removing selected items while dragging.

parent fd0a3348
......@@ -24,6 +24,7 @@
#include "common_actions.h"
#include <tool/action_manager.h>
#include <wx/defs.h>
// 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",
......
......@@ -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 ) )
......
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