Browse Source

Do not define hotkeys for copy/cut/paste to avoid double action execution

CTRL+{X,C,V} used to be handled both by the legacy hotkey system that
generated ID_EDIT_{CUT,COPY,PASTE} wxCommandEvent, and the Tool Framework
hotkey system.

Fixes: lp:1749549
* https://bugs.launchpad.net/kicad/+bug/1749549
pull/5/merge
Maciej Suminski 8 years ago
parent
commit
ab37801489
  1. 4
      pcbnew/tools/edit_tool.cpp
  2. 2
      pcbnew/tools/pcbnew_control.cpp

4
pcbnew/tools/edit_tool.cpp

@ -171,12 +171,12 @@ TOOL_ACTION PCB_ACTIONS::measureTool( "pcbnew.InteractiveEdit.measureTool",
nullptr, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::copyToClipboard( "pcbnew.InteractiveEdit.CopyToClipboard",
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_EDIT_COPY ),
AS_GLOBAL, 0, // do not define a hotkey and let TranslateLegacyId() handle the event
_( "Copy" ), _( "Copy selected content to clipboard" ),
copy_xpm );
TOOL_ACTION PCB_ACTIONS::cutToClipboard( "pcbnew.InteractiveEdit.CutToClipboard",
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_EDIT_CUT ),
AS_GLOBAL, 0, // do not define a hotkey and let TranslateLegacyId() handle the event
_( "Cut" ), _( "Cut selected content to clipboard" ),
cut_xpm );

2
pcbnew/tools/pcbnew_control.cpp

@ -239,7 +239,7 @@ TOOL_ACTION PCB_ACTIONS::toBeDone( "pcbnew.Control.toBeDone",
"", "" ); // so users are aware of that
TOOL_ACTION PCB_ACTIONS::pasteFromClipboard( "pcbnew.InteractiveEdit.pasteFromClipboard",
AS_GLOBAL, MD_CTRL + int( 'V' ),
AS_GLOBAL, 0, // do not define a hotkey and let TranslateLegacyId() handle the event
_( "Paste" ), _( "Paste content from clipboard" ),
paste_xpm );

Loading…
Cancel
Save