Added possibility of removing selected items while dragging.
This commit is contained in:
parent
fd0a3348ea
commit
f4de2877f3
|
@ -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 ) )
|
||||
|
|
Loading…
Reference in New Issue