Re: [Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-04 Thread Fabrizio Tappero
great !

thanks a lot

Fabrizio


On Mon, Jul 3, 2017 at 6:07 PM, Maciej Sumiński  wrote:
> Hi Fabrizio,
>
> No problem, it is already pushed (split into two commits). Thank you for
> the patch!
>
> Cheers,
> Orson
>
> On 07/03/2017 05:41 PM, Fabrizio Tappero wrote:
>> Hi Maciej,
>> yes please!
>>
>> I have been busy with some other patch and I could not find the time
>> to get back to this one. I would it really appreciate if you could
>> apply my patch including Weyne comments. Please mind that the same
>> patch includes some copy icon fixes too.
>>
>> Cheers
>> Fabrizio
>>
>>
>> On Mon, Jul 3, 2017 at 4:51 PM, Maciej Sumiński  
>> wrote:
>>> Hi Kristoffer,
>>>
>>> Thank you very much, I have just pushed your patch. I was really close
>>> to implementing it myself, so I am glad you have done it.
>>>
>>> Other related changes I would like to introduce (open for discussion):
>>>
>>> - Proper naming for copy/duplicate operation (addressed by Fabrizio's
>>> patch, I will simply rebase it and apply Wayne's remarks as it has been
>>> reviewed already)
>>>
>>> - Rename constants to match the actions (BLOCK_COPY->BLOCK_DUPLICATE,
>>> BLOCK_SAVE->BLOCK_COPY)
>>>
>>> - Remove the toolbar icons for cut/copy/paste. I am not sure if they are
>>> even usable (with exception of Paste button). One cannot select a block
>>> and move the mouse cursor out of the schematic frame to click the
>>> toolbar buttons.
>>>
>>> - Add Paste operation in the right-click context menu when clipboard is
>>> not empty.
>>>
>>> Regards,
>>> Orson
>>>
>>> On 07/03/2017 01:51 PM, Kristoffer Ödmark wrote:
 Hey!

 I made the copy/paste/cut functionality work as someone new to the
 software might expect. That is, the cut command now actually puts the
 block in clipboard and then deletes the block, compared to just deleting
 it (wtf)?

 They are also bound to the almost universal defaults of ctrl+c/v/x.

 - Kristoffer


 ___
 Mailing list: https://launchpad.net/~kicad-developers
 Post to : kicad-developers@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~kicad-developers
 More help   : https://help.launchpad.net/ListHelp

>>>
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-03 Thread Kristoffer Ödmark
Yes, in this patch, the patch for pcbnew is still pending in the pcbnew 
clipboard support email since the 4th of may :)




On 2017-07-03 17:40, firewalker wrote:

Only for Eeschema?

On Mon, Jul 3, 2017 at 6:00 PM, Kristoffer Ödmark 
> wrote:


Thank you!

I just got a bit frustrated when using it today :) The changes you
would like to introduce are exactly the things I started thinking about
as well. I agree on all points!

- Kristoffer


On 2017-07-03 16:51, Maciej Sumiński wrote:

Hi Kristoffer,

Thank you very much, I have just pushed your patch. I was really
close
to implementing it myself, so I am glad you have done it.

Other related changes I would like to introduce (open for
discussion):

- Proper naming for copy/duplicate operation (addressed by
Fabrizio's
patch, I will simply rebase it and apply Wayne's remarks as it
has been
reviewed already)

- Rename constants to match the actions
(BLOCK_COPY->BLOCK_DUPLICATE,
BLOCK_SAVE->BLOCK_COPY)

- Remove the toolbar icons for cut/copy/paste. I am not sure if
they are
even usable (with exception of Paste button). One cannot select
a block
and move the mouse cursor out of the schematic frame to click the
toolbar buttons.

- Add Paste operation in the right-click context menu when
clipboard is
not empty.

Regards,
Orson

On 07/03/2017 01:51 PM, Kristoffer Ödmark wrote:

Hey!

I made the copy/paste/cut functionality work as someone new
to the
software might expect. That is, the cut command now actually
puts the
block in clipboard and then deletes the block, compared to
just deleting
it (wtf)?

They are also bound to the almost universal defaults of
ctrl+c/v/x.

- Kristoffer


___
Mailing list: https://launchpad.net/~kicad-developers

Post to : kicad-developers@lists.launchpad.net

Unsubscribe : https://launchpad.net/~kicad-developers

More help   : https://help.launchpad.net/ListHelp






___
Mailing list: https://launchpad.net/~kicad-developers

Post to : kicad-developers@lists.launchpad.net

Unsubscribe : https://launchpad.net/~kicad-developers

More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers

Post to : kicad-developers@lists.launchpad.net

Unsubscribe : https://launchpad.net/~kicad-developers

More help   : https://help.launchpad.net/ListHelp





___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-03 Thread Maciej Sumiński
Hi Fabrizio,

No problem, it is already pushed (split into two commits). Thank you for
the patch!

Cheers,
Orson

On 07/03/2017 05:41 PM, Fabrizio Tappero wrote:
> Hi Maciej,
> yes please!
> 
> I have been busy with some other patch and I could not find the time
> to get back to this one. I would it really appreciate if you could
> apply my patch including Weyne comments. Please mind that the same
> patch includes some copy icon fixes too.
> 
> Cheers
> Fabrizio
> 
> 
> On Mon, Jul 3, 2017 at 4:51 PM, Maciej Sumiński  
> wrote:
>> Hi Kristoffer,
>>
>> Thank you very much, I have just pushed your patch. I was really close
>> to implementing it myself, so I am glad you have done it.
>>
>> Other related changes I would like to introduce (open for discussion):
>>
>> - Proper naming for copy/duplicate operation (addressed by Fabrizio's
>> patch, I will simply rebase it and apply Wayne's remarks as it has been
>> reviewed already)
>>
>> - Rename constants to match the actions (BLOCK_COPY->BLOCK_DUPLICATE,
>> BLOCK_SAVE->BLOCK_COPY)
>>
>> - Remove the toolbar icons for cut/copy/paste. I am not sure if they are
>> even usable (with exception of Paste button). One cannot select a block
>> and move the mouse cursor out of the schematic frame to click the
>> toolbar buttons.
>>
>> - Add Paste operation in the right-click context menu when clipboard is
>> not empty.
>>
>> Regards,
>> Orson
>>
>> On 07/03/2017 01:51 PM, Kristoffer Ödmark wrote:
>>> Hey!
>>>
>>> I made the copy/paste/cut functionality work as someone new to the
>>> software might expect. That is, the cut command now actually puts the
>>> block in clipboard and then deletes the block, compared to just deleting
>>> it (wtf)?
>>>
>>> They are also bound to the almost universal defaults of ctrl+c/v/x.
>>>
>>> - Kristoffer
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-03 Thread Fabrizio Tappero
Hi Maciej,
yes please!

I have been busy with some other patch and I could not find the time
to get back to this one. I would it really appreciate if you could
apply my patch including Weyne comments. Please mind that the same
patch includes some copy icon fixes too.

Cheers
Fabrizio


On Mon, Jul 3, 2017 at 4:51 PM, Maciej Sumiński  wrote:
> Hi Kristoffer,
>
> Thank you very much, I have just pushed your patch. I was really close
> to implementing it myself, so I am glad you have done it.
>
> Other related changes I would like to introduce (open for discussion):
>
> - Proper naming for copy/duplicate operation (addressed by Fabrizio's
> patch, I will simply rebase it and apply Wayne's remarks as it has been
> reviewed already)
>
> - Rename constants to match the actions (BLOCK_COPY->BLOCK_DUPLICATE,
> BLOCK_SAVE->BLOCK_COPY)
>
> - Remove the toolbar icons for cut/copy/paste. I am not sure if they are
> even usable (with exception of Paste button). One cannot select a block
> and move the mouse cursor out of the schematic frame to click the
> toolbar buttons.
>
> - Add Paste operation in the right-click context menu when clipboard is
> not empty.
>
> Regards,
> Orson
>
> On 07/03/2017 01:51 PM, Kristoffer Ödmark wrote:
>> Hey!
>>
>> I made the copy/paste/cut functionality work as someone new to the
>> software might expect. That is, the cut command now actually puts the
>> block in clipboard and then deletes the block, compared to just deleting
>> it (wtf)?
>>
>> They are also bound to the almost universal defaults of ctrl+c/v/x.
>>
>> - Kristoffer
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-03 Thread firewalker
Only for Eeschema?

On Mon, Jul 3, 2017 at 6:00 PM, Kristoffer Ödmark <
kristofferodmar...@gmail.com> wrote:

> Thank you!
>
> I just got a bit frustrated when using it today :) The changes you
> would like to introduce are exactly the things I started thinking about
> as well. I agree on all points!
>
> - Kristoffer
>
>
> On 2017-07-03 16:51, Maciej Sumiński wrote:
>
>> Hi Kristoffer,
>>
>> Thank you very much, I have just pushed your patch. I was really close
>> to implementing it myself, so I am glad you have done it.
>>
>> Other related changes I would like to introduce (open for discussion):
>>
>> - Proper naming for copy/duplicate operation (addressed by Fabrizio's
>> patch, I will simply rebase it and apply Wayne's remarks as it has been
>> reviewed already)
>>
>> - Rename constants to match the actions (BLOCK_COPY->BLOCK_DUPLICATE,
>> BLOCK_SAVE->BLOCK_COPY)
>>
>> - Remove the toolbar icons for cut/copy/paste. I am not sure if they are
>> even usable (with exception of Paste button). One cannot select a block
>> and move the mouse cursor out of the schematic frame to click the
>> toolbar buttons.
>>
>> - Add Paste operation in the right-click context menu when clipboard is
>> not empty.
>>
>> Regards,
>> Orson
>>
>> On 07/03/2017 01:51 PM, Kristoffer Ödmark wrote:
>>
>>> Hey!
>>>
>>> I made the copy/paste/cut functionality work as someone new to the
>>> software might expect. That is, the cut command now actually puts the
>>> block in clipboard and then deletes the block, compared to just deleting
>>> it (wtf)?
>>>
>>> They are also bound to the almost universal defaults of ctrl+c/v/x.
>>>
>>> - Kristoffer
>>>
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : kicad-developers@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-03 Thread Kristoffer Ödmark

Thank you!

I just got a bit frustrated when using it today :) The changes you
would like to introduce are exactly the things I started thinking about
as well. I agree on all points!

- Kristoffer

On 2017-07-03 16:51, Maciej Sumiński wrote:

Hi Kristoffer,

Thank you very much, I have just pushed your patch. I was really close
to implementing it myself, so I am glad you have done it.

Other related changes I would like to introduce (open for discussion):

- Proper naming for copy/duplicate operation (addressed by Fabrizio's
patch, I will simply rebase it and apply Wayne's remarks as it has been
reviewed already)

- Rename constants to match the actions (BLOCK_COPY->BLOCK_DUPLICATE,
BLOCK_SAVE->BLOCK_COPY)

- Remove the toolbar icons for cut/copy/paste. I am not sure if they are
even usable (with exception of Paste button). One cannot select a block
and move the mouse cursor out of the schematic frame to click the
toolbar buttons.

- Add Paste operation in the right-click context menu when clipboard is
not empty.

Regards,
Orson

On 07/03/2017 01:51 PM, Kristoffer Ödmark wrote:

Hey!

I made the copy/paste/cut functionality work as someone new to the
software might expect. That is, the cut command now actually puts the
block in clipboard and then deletes the block, compared to just deleting
it (wtf)?

They are also bound to the almost universal defaults of ctrl+c/v/x.

- Kristoffer


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp






___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-03 Thread Maciej Sumiński
Hi Kristoffer,

Thank you very much, I have just pushed your patch. I was really close
to implementing it myself, so I am glad you have done it.

Other related changes I would like to introduce (open for discussion):

- Proper naming for copy/duplicate operation (addressed by Fabrizio's
patch, I will simply rebase it and apply Wayne's remarks as it has been
reviewed already)

- Rename constants to match the actions (BLOCK_COPY->BLOCK_DUPLICATE,
BLOCK_SAVE->BLOCK_COPY)

- Remove the toolbar icons for cut/copy/paste. I am not sure if they are
even usable (with exception of Paste button). One cannot select a block
and move the mouse cursor out of the schematic frame to click the
toolbar buttons.

- Add Paste operation in the right-click context menu when clipboard is
not empty.

Regards,
Orson

On 07/03/2017 01:51 PM, Kristoffer Ödmark wrote:
> Hey!
> 
> I made the copy/paste/cut functionality work as someone new to the
> software might expect. That is, the cut command now actually puts the
> block in clipboard and then deletes the block, compared to just deleting
> it (wtf)?
> 
> They are also bound to the almost universal defaults of ctrl+c/v/x.
> 
> - Kristoffer
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 




signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] Copy/Paste/Cut defaults to ctrl + c, v, x as most other software.

2017-07-03 Thread Kristoffer Ödmark

Hey!

I made the copy/paste/cut functionality work as someone new to the 
software might expect. That is, the cut command now actually puts the 
block in clipboard and then deletes the block, compared to just deleting 
it (wtf)?


They are also bound to the almost universal defaults of ctrl+c/v/x.

- Kristoffer
>From 42b74018a3596ba2b1a8ea0289c8f924f9973655 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20=C3=96dmark?= 
Date: Mon, 3 Jul 2017 13:46:59 +0200
Subject: [PATCH] Eeschema copy/cut/paste to ctrl+c/x/v cut is now undoable
 Highlight net is now at ctrl+b by default

---
 common/draw_frame.cpp|  4 
 eeschema/block.cpp   | 17 +
 eeschema/hotkeys.cpp |  8 +++-
 eeschema/hotkeys.h   |  2 ++
 eeschema/schedit.cpp | 18 +-
 include/block_commande.h |  1 +
 6 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp
index 42d99c758..b303b43c2 100644
--- a/common/draw_frame.cpp
+++ b/common/draw_frame.cpp
@@ -867,6 +867,8 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, EDA_KEY aKey, const wxPoint& a
 DisplayError( this, wxT( "No block to paste" ), 20 );
 GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE );
 m_canvas->SetMouseCaptureCallback( NULL );
+block->SetState( STATE_NO_BLOCK );
+block->SetMessageBlock( this );
 return true;
 }
 
@@ -875,6 +877,8 @@ bool EDA_DRAW_FRAME::HandleBlockBegin( wxDC* aDC, EDA_KEY aKey, const wxPoint& a
 block->ClearItemsList();
 DisplayError( this,
   wxT( "EDA_DRAW_FRAME::HandleBlockBegin() Err: m_mouseCaptureCallback NULL" ) );
+block->SetState( STATE_NO_BLOCK );
+block->SetMessageBlock( this );
 return true;
 }
 
diff --git a/eeschema/block.cpp b/eeschema/block.cpp
index 7d8c2bfcc..4bfc76924 100644
--- a/eeschema/block.cpp
+++ b/eeschema/block.cpp
@@ -304,6 +304,23 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
 block->ClearItemsList();
 break;
 
+case BLOCK_CUT:
+GetScreen()->UpdatePickList();
+DrawAndSizingBlockOutlines( m_canvas, aDC, wxDefaultPosition, false );
+
+if( block->GetCount() )
+{
+wxPoint move_vector = -GetScreen()->m_BlockLocate.GetLastCursorPosition();
+copyBlockItems( block->GetItems() );
+MoveItemsInList( m_blockItems.GetItems(), move_vector );
+DeleteItemsInList( m_canvas, block->GetItems() );
+OnModify();
+ }
+block->ClearItemsList();
+GetScreen()->TestDanglingEnds();
+m_canvas->Refresh();
+break;
+
 case BLOCK_PASTE:
 block->SetState( STATE_BLOCK_MOVE );
 break;
diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp
index 0a834fd00..5a33d59b1 100644
--- a/eeschema/hotkeys.cpp
+++ b/eeschema/hotkeys.cpp
@@ -194,6 +194,8 @@ static EDA_HOTKEY HkCopyComponentOrText( _HKI( "Copy Component or Label" ),
 
 static EDA_HOTKEY HkDrag( _HKI( "Drag Item" ), HK_DRAG, 'G', ID_SCH_DRAG_ITEM );
 static EDA_HOTKEY HkSaveBlock( _HKI( "Save Block" ), HK_SAVE_BLOCK, 'C' + GR_KB_CTRL, wxID_COPY );
+static EDA_HOTKEY HkPasteBlock( _HKI( "Paste Block" ), HK_PASTE_BLOCK, 'V' + GR_KB_CTRL, wxID_PASTE );
+static EDA_HOTKEY HkCutBlock( _HKI( "Cut Block" ), HK_CUT_BLOCK, 'X' + GR_KB_CTRL, wxID_CUT );
 static EDA_HOTKEY HkMove2Drag( _HKI( "Move Block -> Drag Block" ),
HK_MOVEBLOCK_TO_DRAGBLOCK, '\t', ID_POPUP_DRAG_BLOCK );
 static EDA_HOTKEY HkInsert( _HKI( "Repeat Last Item" ), HK_REPEAT_LAST, WXK_INSERT );
@@ -230,7 +232,7 @@ static EDA_HOTKEY HkUpdatePcbFromSch( _HKI( "Update PCB from Schematic" ), HK_UP
 
 // Higtlight connection
 static EDA_HOTKEY HkHighlightConnection( _HKI( "Highlight Connection" ), ID_HOTKEY_HIGHLIGHT,
- 'X' + GR_KB_CTRL );
+'B' + GR_KB_CTRL );
 
 // List of common hotkey descriptors
 static EDA_HOTKEY* common_Hotkey_List[] =
@@ -281,6 +283,8 @@ static EDA_HOTKEY* schematic_Hotkey_List[] =
 ,
 ,
 ,
+,
+,
 ,
 ,
 ,
@@ -471,7 +475,9 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
 case HK_ZOOM_AUTO:
 case HK_ZOOM_SELECTION:
 case HK_MOVEBLOCK_TO_DRAGBLOCK:  // Switch to drag mode, when block moving
+case HK_PASTE_BLOCK:
 case HK_SAVE_BLOCK:  // Copy block to paste buffer.
+case HK_CUT_BLOCK:
 cmd.SetId( hotKey->m_IdMenuEvent );
 GetEventHandler()->ProcessEvent( cmd );
 break;
diff --git a/eeschema/hotkeys.h b/eeschema/hotkeys.h
index 92211d3c7..9df3d982d 100644
--- a/eeschema/hotkeys.h
+++ b/eeschema/hotkeys.h
@@ -43,6 +43,8 @@ enum