On 1/26/2017 10:06 AM, Diogo Condeço wrote: > @Orson yes moving it into Show seems to work. I will remove the > FixOSXCancelButtonIssue() call from other dialogs to test it further... > > The only dialog I found this doesn't work is the new input for a new > footprint on the module editor... > > @Wayne this is the cancel (cmd-c) button issue... I don't see how the > SetFocus can be resolved in this DIALOG_SHIM since the field to have > focus is different from dialog to dialog...
If a control (wxWindow) has the focus set in the dialog constructor, I'm guessing that wxWindow::FindFocus() will return that window called from Show() so you do not need direct access to the pointer to the control. I could be wrong but it should be fairly easy to test. > > On Thu, Jan 26, 2017 at 2:26 PM, Wayne Stambaugh <stambau...@gmail.com > <mailto:stambau...@gmail.com>> wrote: > > On 1/26/2017 2:52 AM, Maciej Sumiński wrote: > > On 01/25/2017 08:14 PM, Diogo Condeço wrote: > >> Hi all, > >> > >> This patch corrects the CMD+C cancel dialog bug on macos... There are > still > >> some both in the footprint editor, and the board editor. I will try to > >> patch them once i can get some free time. > > > > I wonder if FixOSXCancelButtonIssue() call could be moved to OnShow > > event handler in DIALOG_SHIM. This way it would be invoked automatically > > for every dialog inheriting from DIALOG_SHIM (and I guess this covers > > majority of cases) without manually fixing them one by one. > > > >> There is still the setfocus issue, which I will try to get later on... > But > >> I would like to go through the code, since I don't really know if > there is > >> the need to have two different classes for > graphical_item_properties... One > >> for the FP editor another for the Board Editor... << Any input on this? > > > > There is a lot of repeated code, but also a few subtle differences. If > > everything could be covered by the same code, I am for it. > > I was thinking the same thing as each of these patches has very similar > code. This is why DIALOG_SHIM exists to provide features and fixes to > wxDialog. If they osx focus fix can be handled in DIALOG_SHIM, than I > would prefer it be fixed there rather than every single dialog > source file. > > > > > Regards, > > Orson > > > >> Thanks, > >> > >> > >> > >> _______________________________________________ > >> 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 > <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 > <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> > > > > > -- > Diogo Condeço _______________________________________________ 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