Hmm, you're right, that would also be much less invasive (at least in regards 
to the KiCad code).  And yes, it really is as simple as making the default not 
include & at the start.  

I would note there are a couple of spots where KiCad explicitly uses the & 
symbol, so to fix those, it would still require some changes in KiCad's code.  
I'll submit a patch for wx instead.  I'll try submitting it upstream too, but 
who knows if it will get a positive or timely response.  Thanks!
-- 
"Violence is the last refuge of the incompetent." - Isaac Asimov

> On May 5, 2016, at 9:47 AM, Bernhard Stegmaier <[email protected]> 
> wrote:
> 
> No, it is not yet fixed.
> Bug ticket is still open
>   http://trac.wxwidgets.org/ticket/15678 
> <http://trac.wxwidgets.org/ticket/15678>
> 
> If this workaround works, maybe it would be better instead of working around 
> any single instance in KiCad to patch the wxButton(…) function in wxWidgets 
> to avoid the “&” until the bug is fixed?
> wxWidgets needs to be patched anyway for OS X, so one patch more doesn’t hurt…
> 
> 
> Regards,
> Bernhard
> 
>> On 05 May 2016, at 12:36, Simon Wells <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> the only issue i see with this patch is it seems to be working around
>> the problem rather than fixing it. Has this been fixed in wxwidgets
>> 3.1 if anyone knows?
>> 
>> Simon
>> 
>> On Thu, May 5, 2016 at 8:38 PM, Collin Anderson <[email protected] 
>> <mailto:[email protected]>> wrote:
>>> Another little OS X fix.  Most, though not all, of the dialogs in KiCad 
>>> that have cancel buttons break copy of text on OS X.  If you highlight text 
>>> (for example, the net of a pad, an operation I find myself doing fairly 
>>> often) and hit 'Command-C', the dialog is closed and the text is not 
>>> copied.  Command-C is not ever used in this way under OS X, it should and 
>>> is always intended to copy whatever is selected.
>>> 
>>> The problem stems from how many of the dialogues in KiCad are declaring 
>>> their cancel buttons.  If one declares a button with this constructor:
>>> 
>>> wxButton( this, wxID_CANCEL )
>>> 
>>> then the default name is filled in, which is "&Cancel".  The & is what 
>>> makes a button have a keyboard shortcut with the directly following letter 
>>> (C) in windows, but wx translates this to command-<letter> on OS X.  This 
>>> means any button with the name "&C****> will break copy and paste on OS X 
>>> and simply trigger the button event stead.
>>> 
>>> I went through and fixed *every single button* in Kicad, such that the 
>>> code/behavior is completely unchanged on other platforms, but if __APPLE__ 
>>> is defined, it will explicitly name the button "Cancel" or "Close" as 
>>> opposed to "&Cancel" or "&Close" (both the automatic fill-ins if not 
>>> specified).  It's not pretty, but the only other option I can see is remove 
>>> the keyboard shortcut for the cancel and close buttons entirely, or at 
>>> least change them to a different letter, but that could potentially break 
>>> other people's workflows.
>>> 
>>> Here's the patch!
>>> 
>>> 
>>> 
>>> --
>>> "Violence is the last refuge of the incompetent." - Isaac Asimov
>>> 
>>> 
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers 
>>> <https://launchpad.net/~kicad-developers>
>>> Post to     : [email protected] 
>>> <mailto:[email protected]>
>>> 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     : [email protected] 
>> <mailto:[email protected]>
>> 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     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to