kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #35106
Re: wxGrid boolean changes
OK, guys, here’s a modified-Jon-solution in GRID_TRICKS.
Note that I can’t seem to build with Python on my Mac so the Footprint Wizard is totally untested (although it has, in theory, been updated to use GRID_TRICKS).
Please let me know how it looks….
Cheers,
Jeff.
Attachment:
0001-Don-t-make-user-click-twice-to-toggle-checkbox-in-wx.patch
Description: Binary data
> On 21 Mar 2018, at 21:49, Jeff Young <jeff@xxxxxxxxx> wrote:
>
> My change was in GRID_TRICKS, but doesn’t work very well.
>
> Jon’s was only in the Footprint Wizard, but seems to work better.
>
> I’m currently moving Jon’s to GRID_TRICKS.
>
>
>> On 21 Mar 2018, at 21:48, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
>>
>> Does the footprint wizard use GRID_TRICKS? In either case, we should roll these changes into GRID_TRICKS so it can be used everywhere we us boolean checkboxes in wxGrid.
>>
>> On 03/21/2018 05:38 PM, Jon Evans wrote:
>>> It's already committed, if you use the footprint wizard, any of the boolean values in the parameters table use the new behavior
>>> On Wed, Mar 21, 2018 at 5:31 PM, Wayne Stambaugh <stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>> wrote:
>>> Jeff,
>>> I don't remember the outcome testing Jon's patch. That was a few
>>> weeks ago so my old man memory is at work here. I don't have that
>>> patch any longer so if Jon reposts it, I will test it on windows.
>>> Cheers,
>>> Wayne
>>> On 03/21/2018 05:07 PM, Jeff Young wrote:
>>> Hi Wayne,
>>> That sounds pretty similar to the bad behaviour I was trying to
>>> fix on Linux, so I’m guessing it’ll be the same.
>>> The native control on Mac does a fade-in when checked or
>>> unchecked, which I was trying to retain. But it looks like
>>> we’ll have to go with something more like Jon’s idea (which only
>>> uses the native controls for rendering).
>>> I think you mentioned that Jon’s patch also had issues on
>>> Windows. Do you remember what they were?
>>> Cheers,
>>> Jeff.
>>> On 21 Mar 2018, at 16:29, Wayne Stambaugh
>>> <stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>
>>> <mailto:stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>>>
>>> wrote:
>>> Jeff,
>>> This doesn't work on windows. The first click works as
>>> expected where
>>> is selects the row and checks the checkbox. The subsequent
>>> click
>>> selects the row and the next click behaves like two
>>> consecutive clicks
>>> which leave the checkbox in it's original state. I will try
>>> to test
>>> this on linux tonight when I get home.
>>> Cheers,
>>> Wayne
>>> On 3/21/2018 10:15 AM, Jeff Young wrote:
>>> Oops, scratch that last one (it doesn’t even compile).
>>> Let’s try again:
>>> On 21 Mar 2018, at 10:59, Jeff Young <jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx> <mailto:jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx>>
>>> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>> 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
>>> <jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>
>>> <mailto:jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>>
>>> <mailto:jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>>> 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
>>> <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>
>>> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>
>>> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>>
>>> 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
>>> <jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>
>>> <mailto:jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>>
>>> <mailto:jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>>> 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
>>> <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>
>>> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>
>>> <mailto:jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx>>> 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 <jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>
>>> <mailto:jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>>
>>> <mailto:jon@xxxxxxxxxxxxx
>>> <mailto:jon@xxxxxxxxxxxxx>>> 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 <jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx>
>>> <mailto:jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx>>
>>> <mailto:jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx>>> wrote:
>>> Yep, only tested on OSX.
>>> Patch attached.
>>> Cheers,
>>> Jeff.
>>> On 14 Mar 2018, at
>>> 19:56, Wayne Stambaugh
>>> <stambaughw@xxxxxxxxx
>>> <mailto:stambaughw@xxxxxxxxx>
>>> <mailto:stambaughw@xxxxxxxxx
>>> <mailto:stambaughw@xxxxxxxxx>><mailto:stambaughw@xxxxxxxxx
>>> <mailto:stambaughw@xxxxxxxxx>>>
>>> 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
>>> <jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx>
>>> <mailto:jeff@xxxxxxxxx
>>> <mailto:jeff@xxxxxxxxx>>
>>> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>
>>> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>> 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
>>> <jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx> <mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>><mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>>
>>> <mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>>> 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
>>> <jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>><mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>
>>> <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>>> 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>
>>> <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
>>> <jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx> <mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>><mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>>
>>> <mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>>> 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>
>>> <https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>>
>>> Post to
>>> :
>>> kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> Unsubscribe
>>> :
>>> https://launchpad.net/~kicad-developers
>>> <https://launchpad.net/~kicad-developers>
>>> <https://launchpad.net/~kicad-developers <https://launchpad.net/~kicad-developers>>
>>> More
>>> help :
>>> https://help.launchpad.net/ListHelp
>>> <https://help.launchpad.net/ListHelp>
>>> <https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>>
>>> _______________________________________________
>>> Mailing list:
>>> https://launchpad.net/~kicad-developers
>>> <https://launchpad.net/~kicad-developers>
>>> Post to :
>>> kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> 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
>>> <https://launchpad.net/~kicad-developers>
>>> Post to :
>>> kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> 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
>>> <https://launchpad.net/~kicad-developers>
>>> Post to :
>>> kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> 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
>>> <https://launchpad.net/~kicad-developers>
>>> Post to :kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> 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
>>> <https://launchpad.net/~kicad-developers>
>>> Post to :kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> 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
>>> <https://launchpad.net/~kicad-developers>
>>> Post to :kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> 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
>>> <https://launchpad.net/~kicad-developers>
>>> Post to :kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>> 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
>>> <https://launchpad.net/~kicad-developers>
>>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>> 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@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
Follow ups
References
-
wxGrid boolean changes
From: Jon Evans, 2018-03-14
-
Re: wxGrid boolean changes
From: Jon Evans, 2018-03-14
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-14
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-14
-
Re: wxGrid boolean changes
From: Wayne Stambaugh, 2018-03-14
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-14
-
Re: wxGrid boolean changes
From: Jon Evans, 2018-03-15
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-15
-
Re: wxGrid boolean changes
From: Jon Evans, 2018-03-15
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-20
-
Re: wxGrid boolean changes
From: Jon Evans, 2018-03-20
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-21
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-21
-
Re: wxGrid boolean changes
From: Wayne Stambaugh, 2018-03-21
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-21
-
Re: wxGrid boolean changes
From: Wayne Stambaugh, 2018-03-21
-
Re: wxGrid boolean changes
From: Jon Evans, 2018-03-21
-
Re: wxGrid boolean changes
From: Wayne Stambaugh, 2018-03-21
-
Re: wxGrid boolean changes
From: Jeff Young, 2018-03-21