← Back to team overview

kicad-developers team mailing list archive

Re: Dialog SetFocus && SetSelection patch

 

You need to use wxformbuilder, otherwise someone else editing the
dialog would overwrite your changes.

On Thu, Sep 1, 2016 at 6:51 PM, Diogo Condeço <ct2irw@xxxxxxxxx> wrote:
> Hi all,
>
> I've attached a patch to correct some dialog behaviour in kicad. Tested on
> mac os x and windows...
>
> Affected dialogs are:
>
> pcbnew > find component - set focus and selection
> pcbnew > pad properties - set focus and selection
> eeschema > add component - only set focus
>
> IMHO the correct behaviour should be set focus to the first or most relevant
> field and select the text in it for prompt replacement... In some cases this
> might be different like eeschema add component, where the cursor goes to the
> text field but the selection goes the the last one used (if it exists).
>
> I've also managed to get edit field in eeschema (edit reference/value field
> dialog) to work on mac os x, but in windows it isn't working 100%, so I will
> release it later... Since this dialog is shared for different values, it is
> a little bit trickier...
>
> The patch is quite simple just add the OnDialogInit event to take care of
> the setfocus and setselection operation.
>
> I don't have wxformbuilder to edit the generated files, so I did it by
> hand... so forgive me for not caring about the // PLEASE DO "NOT" EDIT THIS
> FILE! note
>
> Please test it and let me know the result... Also if you find more
> problematic dialogs let me know and I can change them. I am 10000% sure
> there are more with setfocus problems... it's just a question of find them.
>
> Once the other dialog is working I will post the patch.
>
> --
> Diogo Condeço
>
>
> _______________________________________________
> 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
>


References