Re: [Kicad-developers] GAL canvas behavior.

2017-08-01 Thread Maciej Sumiński
I pushed the patch, as for now it has only received positive feedback.
Perhaps after merging it will get more attention.

Cheers,
Orson

On 07/31/2017 06:58 PM, Wayne Stambaugh wrote:
> Orson,
> 
> I like this is behavior lot better.  The hotkey behavior is much closer
> to the legacy canvas.  You may want to wait for feedback from the folks
> who prefer to select everything.
> 
> Thanks,
> 
> Wayne
> 
> On 7/31/2017 4:48 AM, Maciej Sumiński wrote:
>> I think I got the right solution that would work for everyone. In case
>> there was nothing selected before a right click, then the selection
>> should be cleared after the context menu is shown (no matter whether
>> cancelled or used).
>> It is coherent with the hot keys behavior and allows the user to apply
>> both working methods: either select items and decide on action or
>> execute an action for a pointed item. I attach the patch for comments.
>>
>> Cheers,
>> Orson
>>
>> On 07/20/2017 07:22 PM, Wayne Stambaugh wrote:
>>> I've finally forced myself to start using the GAL canvas for new
>>> projects and I immediately ran into an unexpected behavior regarding
>>> context menus.  If I right click on an object, it gets selected and the
>>> context menu for that object is shown as expected.  If I change my mind
>>> and close the context menu with the escape key, the context menu
>>> disappears.  So far so good but here is where things get ugly.  The
>>> object from the canceled context menu is still selected so if I move the
>>> cursor to a different object and right click, the context menu from the
>>> previously (still) selected object appears and selecting a command from
>>> the context menu will be performed on the object at the first right
>>> click position rather than the object the cursor is currently over.
>>> This seems broken to me.  I have to hit the escape key a second time to
>>> deselect the initial object selection.  Is this the behavior we really
>>> want?  I would expect that the initial object would have been deselected
>>> when I aborted the context menu (or performed a command on the selected
>>> object) so the next right click would select the new object.  With the
>>> current behavior, I have to hit the escape key a second time to deselect
>>> the original selection.  Anyone who has been following the dev mailing
>>> list for any amount of time knows how much I dislike additional steps to
>>> accomplish a task.  This falls under that category in a big way.  Can
>>> this be changed to mimic the behavior of the legacy canvas?  If so, I
>>> will file a bug report.  If not, we need to discuss this before I am
>>> willing to kick the legacy canvas to the curb.
>>>
>>> Cheers,
>>>
>>> Wayne
>>>
>>> ___
>>> 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
> 




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] GAL canvas behavior.

2017-07-31 Thread Greg Smith
This is the exact solution I was thinking of as well. GREAT JOB! I am unable to 
test the patch, but I applaud the solution.

Greg S.

> On Jul 31, 2017, at 3:48 AM, Maciej Sumiński  wrote:
> 
> I think I got the right solution that would work for everyone. In case
> there was nothing selected before a right click, then the selection
> should be cleared after the context menu is shown (no matter whether
> cancelled or used).


___
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] GAL canvas behavior.

2017-07-31 Thread Wayne Stambaugh
Orson,

I like this is behavior lot better.  The hotkey behavior is much closer
to the legacy canvas.  You may want to wait for feedback from the folks
who prefer to select everything.

Thanks,

Wayne

On 7/31/2017 4:48 AM, Maciej Sumiński wrote:
> I think I got the right solution that would work for everyone. In case
> there was nothing selected before a right click, then the selection
> should be cleared after the context menu is shown (no matter whether
> cancelled or used).
> It is coherent with the hot keys behavior and allows the user to apply
> both working methods: either select items and decide on action or
> execute an action for a pointed item. I attach the patch for comments.
> 
> Cheers,
> Orson
> 
> On 07/20/2017 07:22 PM, Wayne Stambaugh wrote:
>> I've finally forced myself to start using the GAL canvas for new
>> projects and I immediately ran into an unexpected behavior regarding
>> context menus.  If I right click on an object, it gets selected and the
>> context menu for that object is shown as expected.  If I change my mind
>> and close the context menu with the escape key, the context menu
>> disappears.  So far so good but here is where things get ugly.  The
>> object from the canceled context menu is still selected so if I move the
>> cursor to a different object and right click, the context menu from the
>> previously (still) selected object appears and selecting a command from
>> the context menu will be performed on the object at the first right
>> click position rather than the object the cursor is currently over.
>> This seems broken to me.  I have to hit the escape key a second time to
>> deselect the initial object selection.  Is this the behavior we really
>> want?  I would expect that the initial object would have been deselected
>> when I aborted the context menu (or performed a command on the selected
>> object) so the next right click would select the new object.  With the
>> current behavior, I have to hit the escape key a second time to deselect
>> the original selection.  Anyone who has been following the dev mailing
>> list for any amount of time knows how much I dislike additional steps to
>> accomplish a task.  This falls under that category in a big way.  Can
>> this be changed to mimic the behavior of the legacy canvas?  If so, I
>> will file a bug report.  If not, we need to discuss this before I am
>> willing to kick the legacy canvas to the curb.
>>
>> Cheers,
>>
>> Wayne
>>
>> ___
>> 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] GAL canvas behavior.

2017-07-31 Thread Maciej Sumiński
I think I got the right solution that would work for everyone. In case
there was nothing selected before a right click, then the selection
should be cleared after the context menu is shown (no matter whether
cancelled or used).
It is coherent with the hot keys behavior and allows the user to apply
both working methods: either select items and decide on action or
execute an action for a pointed item. I attach the patch for comments.

Cheers,
Orson

On 07/20/2017 07:22 PM, Wayne Stambaugh wrote:
> I've finally forced myself to start using the GAL canvas for new
> projects and I immediately ran into an unexpected behavior regarding
> context menus.  If I right click on an object, it gets selected and the
> context menu for that object is shown as expected.  If I change my mind
> and close the context menu with the escape key, the context menu
> disappears.  So far so good but here is where things get ugly.  The
> object from the canceled context menu is still selected so if I move the
> cursor to a different object and right click, the context menu from the
> previously (still) selected object appears and selecting a command from
> the context menu will be performed on the object at the first right
> click position rather than the object the cursor is currently over.
> This seems broken to me.  I have to hit the escape key a second time to
> deselect the initial object selection.  Is this the behavior we really
> want?  I would expect that the initial object would have been deselected
> when I aborted the context menu (or performed a command on the selected
> object) so the next right click would select the new object.  With the
> current behavior, I have to hit the escape key a second time to deselect
> the original selection.  Anyone who has been following the dev mailing
> list for any amount of time knows how much I dislike additional steps to
> accomplish a task.  This falls under that category in a big way.  Can
> this be changed to mimic the behavior of the legacy canvas?  If so, I
> will file a bug report.  If not, we need to discuss this before I am
> willing to kick the legacy canvas to the curb.
> 
> Cheers,
> 
> Wayne
> 
> ___
> 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
> 

From 9b27fd19d88cce6fbf240a73d4e5a71e1f1555ec Mon Sep 17 00:00:00 2001
From: Maciej Suminski 
Date: Mon, 31 Jul 2017 10:17:37 +0200
Subject: [PATCH] Cancel selection if an item has been selected by right click

---
 pcbnew/tools/selection_tool.cpp | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp
index ebf93f569..b7b5bae86 100644
--- a/pcbnew/tools/selection_tool.cpp
+++ b/pcbnew/tools/selection_tool.cpp
@@ -232,6 +232,8 @@ void SELECTION_TOOL::Reset( RESET_REASON aReason )
 
 int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
 {
+bool unselect = false;
+
 // Main loop: keep receiving events
 while( OPT_TOOL_EVENT evt = Wait() )
 {
@@ -265,9 +267,9 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
 // right click? if there is any object - show the context menu
 else if( evt->IsClick( BUT_RIGHT ) )
 {
-bool emptySelection = m_selection.Empty();
+unselect = m_selection.Empty();
 
-if( emptySelection )
+if( unselect )
 selectPoint( evt->Position() );
 
 m_menu.ShowContextMenu( m_selection );
@@ -301,6 +303,7 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
 else
 {
 m_toolMgr->InvokeTool( "pcbnew.InteractiveEdit" );
+unselect = true;
 }
 }
 
@@ -320,9 +323,11 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
 }
 }
 
-else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO_PRE )
+else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO_PRE
+|| ( unselect && m_toolMgr->GetCurrentToolId() == GetId() ) )
 {
 clearSelection();
+unselect = false;
 }
 
 else if( evt->Action() == TA_CONTEXT_MENU_CLOSED )
-- 
2.13.3



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] GAL canvas behavior.

2017-07-22 Thread Wayne Stambaugh
On 7/20/2017 4:38 PM, Oliver Walters wrote:
> I think the object should remain selected after the context menu is
> closed. But, right clicking on a *different* object should deselect the
> first one, select the new one, and then open the context menu on the
> newly selected item. 
> 
> There are many times that erroneously deselecting the first item would
> result in more work for the user, as they wanted to cancel the menu but
> not the selection. 

I'm OK with this but I do not want to have to manually deselect the
first object to perform a right click action on a different object.  I
would be fine if we made this behavior an option for users who feel the
need to select and deselect objects manually.

> 
> On 21 Jul 2017 03:22, "Wayne Stambaugh"  > wrote:
> 
> I've finally forced myself to start using the GAL canvas for new
> projects and I immediately ran into an unexpected behavior regarding
> context menus.  If I right click on an object, it gets selected and the
> context menu for that object is shown as expected.  If I change my mind
> and close the context menu with the escape key, the context menu
> disappears.  So far so good but here is where things get ugly.  The
> object from the canceled context menu is still selected so if I move the
> cursor to a different object and right click, the context menu from the
> previously (still) selected object appears and selecting a command from
> the context menu will be performed on the object at the first right
> click position rather than the object the cursor is currently over.
> This seems broken to me.  I have to hit the escape key a second time to
> deselect the initial object selection.  Is this the behavior we really
> want?  I would expect that the initial object would have been deselected
> when I aborted the context menu (or performed a command on the selected
> object) so the next right click would select the new object.  With the
> current behavior, I have to hit the escape key a second time to deselect
> the original selection.  Anyone who has been following the dev mailing
> list for any amount of time knows how much I dislike additional steps to
> accomplish a task.  This falls under that category in a big way.  Can
> this be changed to mimic the behavior of the legacy canvas?  If so, I
> will file a bug report.  If not, we need to discuss this before I am
> willing to kick the legacy canvas to the curb.
> 
> Cheers,
> 
> Wayne
> 
> ___
> 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] GAL canvas behavior.

2017-07-21 Thread Sergey A. Borshch

On 21.07.2017 11:26, Lorenzo Marcantonio wrote:

It seems to me that most of the features (that I use, at least) from legacy are 
fine on GAL.



I didn't find next features I often use in "route tracks" mode:

1) Delete last segment while placing track ("Backspace" key in Legacy)
2) Move segment node ("M" key in legacy)


--
Regards,
  Sergey A. Borshchmailto: sb...@sourceforge.net
SB ELDI ltd. Riga, Latvia

___
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] GAL canvas behavior.

2017-07-21 Thread Lorenzo Marcantonio
On Fri, Jul 21, 2017 at 10:01:36AM +0200, Ingo Kletti wrote:
> I've been using the GAL canvas from the start and therefore pressing the ESC
> key twice to deselect an object is 'natural' to me. Even more since
> LibreCAD, the other tool I use regularly, has the same behavior.

Well, I actually *never* select an object I just hover it and press the
key :P However I agree that shift-selection is quite useful to nudge
things around and make space.

I confirm that the cursor handling for measurement etc is now finished
in GAL. Even found the 'always show cursor' option, which I somehome
missed at first.

Also, armed with the knowledge of *how* the anchor point is chosen, when
the cursor is shown it correctly warps to the anchor.

Kudos for the combination color picker too.

It seems to me that most of the features (that I use, at least) from legacy are 
fine on GAL.

Keep on the good work

-- 
Lorenzo Marcantonio


signature.asc
Description: PGP 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] GAL canvas behavior.

2017-07-21 Thread Ingo Kletti
I've been using the GAL canvas from the start and therefore pressing the 
ESC key twice to deselect an object is 'natural' to me. Even more since 
LibreCAD, the other tool I use regularly, has the same behavior.


It never occured to me this behavior might not be intended.

I also second Greg's and Oliver's argument that the component remains 
selected. Especially for multiple selected objects, having to reselect 
them each time the context menu is dismissed would be a tedious task.


Regards,

Ingo

___
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] GAL canvas behavior.

2017-07-20 Thread Oliver Walters
I think the object should remain selected after the context menu is closed.
But, right clicking on a *different* object should deselect the first one,
select the new one, and then open the context menu on the newly selected
item.

There are many times that erroneously deselecting the first item would
result in more work for the user, as they wanted to cancel the menu but not
the selection.

On 21 Jul 2017 03:22, "Wayne Stambaugh"  wrote:

> I've finally forced myself to start using the GAL canvas for new
> projects and I immediately ran into an unexpected behavior regarding
> context menus.  If I right click on an object, it gets selected and the
> context menu for that object is shown as expected.  If I change my mind
> and close the context menu with the escape key, the context menu
> disappears.  So far so good but here is where things get ugly.  The
> object from the canceled context menu is still selected so if I move the
> cursor to a different object and right click, the context menu from the
> previously (still) selected object appears and selecting a command from
> the context menu will be performed on the object at the first right
> click position rather than the object the cursor is currently over.
> This seems broken to me.  I have to hit the escape key a second time to
> deselect the initial object selection.  Is this the behavior we really
> want?  I would expect that the initial object would have been deselected
> when I aborted the context menu (or performed a command on the selected
> object) so the next right click would select the new object.  With the
> current behavior, I have to hit the escape key a second time to deselect
> the original selection.  Anyone who has been following the dev mailing
> list for any amount of time knows how much I dislike additional steps to
> accomplish a task.  This falls under that category in a big way.  Can
> this be changed to mimic the behavior of the legacy canvas?  If so, I
> will file a bug report.  If not, we need to discuss this before I am
> willing to kick the legacy canvas to the curb.
>
> Cheers,
>
> Wayne
>
> ___
> 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] GAL canvas behavior.

2017-07-20 Thread Greg Smith
(Sorry for the duplicate, Wayne. This time I replied all.)
I much prefer that the selected objects remain selected. If the selection took 
precision, especially for multi-object additive multiple selection, then having 
to reselect even a subset is arduous. The addition of the extra "Esc" key 
requirement is reduced because it is pressing the *same* key, where your hand 
already is on the keyboard.
 

On Thursday, July 20, 2017 12:22 PM, Wayne Stambaugh  
wrote:
 

 I've finally forced myself to start using the GAL canvas for new
projects and I immediately ran into an unexpected behavior regarding
context menus.  If I right click on an object, it gets selected and the
context menu for that object is shown as expected.  If I change my mind
and close the context menu with the escape key, the context menu
disappears.  So far so good but here is where things get ugly.  The
object from the canceled context menu is still selected so if I move the
cursor to a different object and right click, the context menu from the
previously (still) selected object appears and selecting a command from
the context menu will be performed on the object at the first right
click position rather than the object the cursor is currently over.
This seems broken to me.  I have to hit the escape key a second time to
deselect the initial object selection.  Is this the behavior we really
want?  I would expect that the initial object would have been deselected
when I aborted the context menu (or performed a command on the selected
object) so the next right click would select the new object.  With the
current behavior, I have to hit the escape key a second time to deselect
the original selection.  Anyone who has been following the dev mailing
list for any amount of time knows how much I dislike additional steps to
accomplish a task.  This falls under that category in a big way.  Can
this be changed to mimic the behavior of the legacy canvas?  If so, I
will file a bug report.  If not, we need to discuss this before I am
willing to kick the legacy canvas to the curb.

Cheers,

Wayne

___
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


[Kicad-developers] GAL canvas behavior.

2017-07-20 Thread Wayne Stambaugh
I've finally forced myself to start using the GAL canvas for new
projects and I immediately ran into an unexpected behavior regarding
context menus.  If I right click on an object, it gets selected and the
context menu for that object is shown as expected.  If I change my mind
and close the context menu with the escape key, the context menu
disappears.  So far so good but here is where things get ugly.  The
object from the canceled context menu is still selected so if I move the
cursor to a different object and right click, the context menu from the
previously (still) selected object appears and selecting a command from
the context menu will be performed on the object at the first right
click position rather than the object the cursor is currently over.
This seems broken to me.  I have to hit the escape key a second time to
deselect the initial object selection.  Is this the behavior we really
want?  I would expect that the initial object would have been deselected
when I aborted the context menu (or performed a command on the selected
object) so the next right click would select the new object.  With the
current behavior, I have to hit the escape key a second time to deselect
the original selection.  Anyone who has been following the dev mailing
list for any amount of time knows how much I dislike additional steps to
accomplish a task.  This falls under that category in a big way.  Can
this be changed to mimic the behavior of the legacy canvas?  If so, I
will file a bug report.  If not, we need to discuss this before I am
willing to kick the legacy canvas to the curb.

Cheers,

Wayne

___
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