Oops, scratch that last one (it doesn’t even compile).

Let’s try again:

Attachment: 0003-Don-t-make-users-click-twice-to-toggle-a-wxGrid-chec.patch
Description: Binary data



On 21 Mar 2018, at 10:59, Jeff Young <j...@rokeby.ie> wrote:

Hi Jon,

Could you try this one out on Linux?  (It should be active for the library tables, but not the footprint wizard.)

Thanks,
Jeff.

<0003-Don-t-make-users-click-twice-to-toggle-a-wxGrid-chec.patch>


On 20 Mar 2018, at 13:49, Jon Evans <j...@craftyjon.com> wrote:

I haven't started on it yet, feel free to do so if you want and have time.



On Tue, Mar 20, 2018, 09:48 Jeff Young <j...@rokeby.ie> wrote:
Hi Jon,

Do you want me to take this up, or are you working on it?

Cheers,
Jeff.


On 15 Mar 2018, at 12:20, Jon Evans <j...@craftyjon.com> wrote:

Yes, you'd need python scripting turned on.

I will try to make a version that applies to the library tables for testing.

-Jon 

On Thu, Mar 15, 2018, 07:32 Jeff Young <j...@rokeby.ie> wrote:
I tried to test out your version, Jon, but I don’t have a Footprint Wizard.  (Is that because I have scripting turned off?)

On 15 Mar 2018, at 01:16, Jon Evans <j...@craftyjon.com> wrote:

I gave it a try and there is some strange behavior on Linux :-(
Clicks on the checkboxes seem to sometimes get handled twice so the box quickly toggles between states.
So, I don't think it should be merged as-is.

Can you guys confirm that the behavior is good from my version (as implemented in the footprint wizard parameters table) on Mac/Windows?
If so, I will work on a general solution based on that which can be used with the GRID_TRICKS mixin.

-Jon

On Wed, Mar 14, 2018 at 4:20 PM, Jeff Young <j...@rokeby.ie> wrote:
Yep, only tested on OSX.

Patch attached.

Cheers,
Jeff.




On 14 Mar 2018, at 19:56, Wayne Stambaugh <stambau...@gmail.com> wrote:

I'm assuming you only tested this on macos correct?  If so, please
submit a patch so we can test in on windows and linux.  I think the risk
is low but it shouldn't take long to test it.  If there aren't any
issues, then it can be merged so Jon can use and we wont have to rework
any code in v6.

On 3/14/2018 3:52 PM, Jeff Young wrote:
@Wayne, any opinion on this one?  Should I merge it or play it safe and
leave it in 6.0?



On 14 Mar 2018, at 14:12, Jeff Young <j...@rokeby.ie
<mailto:j...@rokeby.ie>> wrote:

IIRC, it was tricky to get right because you can’t fire it when the
cell *does* have focus or wxWidgets gets itself tied in knots.  (It
turns out that’s OK because when it does have focus wxWidgets toggles
it with a single-click anyway.)

It was also a bit tricky around reference counting.

The current version has had a decent amount of testing in my 6.0
branch, so it’s good-to-go on Mac.  But after the teething troubles I
was hesitant to merge it given possible issues on other platforms.

I do think we should add (2).  I'm happy for you to tackle it, Jon.

(I’m also happy to merge my version to 5.0 first if others think it’s
worth the risk.)

Cheers,
Jeff


On 14 Mar 2018, at 14:03, Jon Evans <j...@craftyjon.com
<mailto:j...@craftyjon.com>> wrote:

Thanks Jeff, it doesn't look like that big a change but if you think
it should wait I don't feel strongly, except that it might make
maintenance more annoying if we have one implementation in 5.0 and
one in 6.0.

Anyone else have opinions on this?
I think (2) should be added to Jeff's implementation and I can
probably handle that unless you want to, Jeff

-Jon

On Wed, Mar 14, 2018 at 9:58 AM, Jeff Young <j...@rokeby.ie
<mailto:j...@rokeby.ie>> wrote:

   Hi Jon,

   I implemented (1), (3) and (4) in 6.0.  It was tweaky enough that
   I don’t recommend it for 5.0 (but I don’t fee strongly). 

   You can see my implementation here:
    https://git.launchpad.net/~jeyjey/kicad/commit/?h=6.0&id=7dda85fdae21f162bd7413fdceb16e49698f31bf
   <https://git.launchpad.net/~jeyjey/kicad/commit/?h=6.0&id=7dda85fdae21f162bd7413fdceb16e49698f31bf>.

   Cheers,
   Jeff.


   On 14 Mar 2018, at 13:50, Jon Evans <j...@craftyjon.com
   <mailto:j...@craftyjon.com>> wrote:

   Hi all,

   I recently (2f86b497) changed the behavior of the wxGrid in the
   footprint wizard dialog to fix some issues with boolean
   (checkbox) parameters.

   The default behavior from wxWidgets (at least in 3.0) is buggy
   in that the update events don't get sent out when you'd expect
   from the wxGridCellBoolEditor.

   I have found that I can get behavior that makes sense to me by
   overriding event handlers for the grid itself, but I'd like to
   make a more generic fix that can be easily portable to other
   grids, since we will likely have more places to use checkboxes
   in grids in the future.

   Before I go too far down that path, I wanted to check that the
   new footprint wizard grid behavior matches with everyone's
   expectations for how it should work:

   1) you can toggle the checkbox on/off with a single left click
   2) you can also toggle with the spacebar if the cell is highlighted
   3) nothing happens for double click / right click / etc.
   4) if you click inside the cell (but outside the checkbox) the
   checkbox is also toggled for convenience

   Thanks,
   Jon
   _______________________________________________
   Mailing list: https://launchpad.net/~kicad-developers
   <https://launchpad.net/~kicad-developers>
   Post to     : kicad-developers@lists.launchpad.net
   <mailto:kicad-developers@lists.launchpad.net>
   Unsubscribe : https://launchpad.net/~kicad-developers
   <https://launchpad.net/~kicad-developers>
   More help   : https://help.launchpad.net/ListHelp
   <https://help.launchpad.net/ListHelp>



_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
<mailto: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





_______________________________________________
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

Reply via email to