renamed copypasta functions, fixed a paste_module error
This commit is contained in:
parent
e19882577a
commit
4ce38abce2
|
@ -58,7 +58,7 @@ void CLIPBOARD_IO::setBoard( BOARD* aBoard )
|
||||||
m_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.
|
LOCALE_IO toggle; // toggles on, then off, the C locale.
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ public:
|
||||||
/* Writes all the settings of the BOARD* set by setBoard() and then adds all
|
/* 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
|
* 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();
|
BOARD_ITEM* Parse();
|
||||||
|
|
||||||
|
|
|
@ -165,12 +165,12 @@ TOOL_ACTION PCB_ACTIONS::measureTool( "pcbnew.InteractiveEdit.measureTool",
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::copyToClipboard( "pcbnew.InteractiveEdit.CopyToClipboard",
|
TOOL_ACTION PCB_ACTIONS::copyToClipboard( "pcbnew.InteractiveEdit.CopyToClipboard",
|
||||||
AS_GLOBAL, MD_CTRL + int( 'C' ),
|
AS_GLOBAL, MD_CTRL + int( 'C' ),
|
||||||
_( "Copy to Clipboard" ), _( "Copy selected content to clipboard" ),
|
_( "Copy" ), _( "Copy selected content to clipboard" ),
|
||||||
copy_xpm );
|
copy_xpm );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::cutToClipboard( "pcbnew.InteractiveEdit.CutToClipboard",
|
TOOL_ACTION PCB_ACTIONS::cutToClipboard( "pcbnew.InteractiveEdit.CutToClipboard",
|
||||||
AS_GLOBAL, MD_CTRL + int( 'X' ),
|
AS_GLOBAL, MD_CTRL + int( 'X' ),
|
||||||
_( "Cut to Clipboard" ), _( "Cut selected content to clipboard" ),
|
_( "Cut" ), _( "Cut selected content to clipboard" ),
|
||||||
cut_xpm );
|
cut_xpm );
|
||||||
|
|
||||||
|
|
||||||
|
@ -1304,7 +1304,9 @@ int EDIT_TOOL::copyToClipboard( const TOOL_EVENT& aEvent )
|
||||||
int EDIT_TOOL::cutToClipboard( const TOOL_EVENT& aEvent )
|
int EDIT_TOOL::cutToClipboard( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
copyToClipboard( aEvent );
|
copyToClipboard( aEvent );
|
||||||
Remove( aEvent );
|
TOOL_EVENT ev;
|
||||||
|
ev.SetParameter( PCB_ACTIONS::REMOVE_FLAGS::NORMAL );
|
||||||
|
Remove( ev );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -421,7 +421,7 @@ int PCB_EDITOR_CONTROL::PlaceModule( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
cursorPos = controls->GetCursorPosition();
|
cursorPos = controls->GetCursorPosition();
|
||||||
|
|
||||||
if( evt->IsCancel() )
|
if( evt->IsCancel() || evt->IsActivate() )
|
||||||
{
|
{
|
||||||
if( module )
|
if( module )
|
||||||
{
|
{
|
||||||
|
|
|
@ -227,7 +227,7 @@ TOOL_ACTION PCB_ACTIONS::toBeDone( "pcbnew.Control.toBeDone",
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::pasteFromClipboard( "pcbnew.InteractiveEdit.pasteFromClipboard",
|
TOOL_ACTION PCB_ACTIONS::pasteFromClipboard( "pcbnew.InteractiveEdit.pasteFromClipboard",
|
||||||
AS_GLOBAL, MD_CTRL + int( 'V' ),
|
AS_GLOBAL, MD_CTRL + int( 'V' ),
|
||||||
_( "Paste from Clipboard" ), _( "Paste content from clipboard" ),
|
_( "Paste" ), _( "Paste content from clipboard" ),
|
||||||
paste_xpm );
|
paste_xpm );
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue