Browse Source

renamed copypasta functions, fixed a paste_module error

pull/5/merge
Kristoffer Ödmark 8 years ago
committed by Tomasz Włostowski
parent
commit
4ce38abce2
  1. 2
      pcbnew/kicad_clipboard.cpp
  2. 2
      pcbnew/kicad_clipboard.h
  3. 8
      pcbnew/tools/edit_tool.cpp
  4. 2
      pcbnew/tools/pcb_editor_control.cpp
  5. 2
      pcbnew/tools/pcbnew_control.cpp

2
pcbnew/kicad_clipboard.cpp

@ -58,7 +58,7 @@ void CLIPBOARD_IO::setBoard( BOARD* aBoard )
m_board = aBoard;
}
void CLIPBOARD_IO::SaveSelection( SELECTION& aSelected )
void CLIPBOARD_IO::SaveSelection( const SELECTION& aSelected )
{
LOCALE_IO toggle; // toggles on, then off, the C locale.

2
pcbnew/kicad_clipboard.h

@ -65,7 +65,7 @@ public:
/* Writes all the settings of the BOARD* set by setBoard() and then adds all
* the BOARD_ITEM* found in selection formatted by PCB_IO to clipboard as a text
*/
void SaveSelection( SELECTION& selected );
void SaveSelection( const SELECTION& selected );
BOARD_ITEM* Parse();

8
pcbnew/tools/edit_tool.cpp

@ -165,12 +165,12 @@ TOOL_ACTION PCB_ACTIONS::measureTool( "pcbnew.InteractiveEdit.measureTool",
TOOL_ACTION PCB_ACTIONS::copyToClipboard( "pcbnew.InteractiveEdit.CopyToClipboard",
AS_GLOBAL, MD_CTRL + int( 'C' ),
_( "Copy to Clipboard" ), _( "Copy selected content to clipboard" ),
_( "Copy" ), _( "Copy selected content to clipboard" ),
copy_xpm );
TOOL_ACTION PCB_ACTIONS::cutToClipboard( "pcbnew.InteractiveEdit.CutToClipboard",
AS_GLOBAL, MD_CTRL + int( 'X' ),
_( "Cut to Clipboard" ), _( "Cut selected content to clipboard" ),
_( "Cut" ), _( "Cut selected content to clipboard" ),
cut_xpm );
@ -1304,7 +1304,9 @@ int EDIT_TOOL::copyToClipboard( const TOOL_EVENT& aEvent )
int EDIT_TOOL::cutToClipboard( const TOOL_EVENT& aEvent )
{
copyToClipboard( aEvent );
Remove( aEvent );
TOOL_EVENT ev;
ev.SetParameter( PCB_ACTIONS::REMOVE_FLAGS::NORMAL );
Remove( ev );
return 0;
}

2
pcbnew/tools/pcb_editor_control.cpp

@ -421,7 +421,7 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent )
{
cursorPos = controls->GetCursorPosition();
if( evt->IsCancel() )
if( evt->IsCancel() || evt->IsActivate() )
{
if( module )
{

2
pcbnew/tools/pcbnew_control.cpp

@ -227,7 +227,7 @@ TOOL_ACTION PCB_ACTIONS::toBeDone( "pcbnew.Control.toBeDone",
TOOL_ACTION PCB_ACTIONS::pasteFromClipboard( "pcbnew.InteractiveEdit.pasteFromClipboard",
AS_GLOBAL, MD_CTRL + int( 'V' ),
_( "Paste from Clipboard" ), _( "Paste content from clipboard" ),
_( "Paste" ), _( "Paste content from clipboard" ),
paste_xpm );

Loading…
Cancel
Save