kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #18640
Re: [PATCH] Select all previously searched text when opening Find / FindAndReplace dialogs
On 6/15/2015 12:34 PM, Martin d'Allens wrote:
> Sorry about the braces, here is a correct version.
>
> I don't think this is platform specific, but it might. Or it could
> depend on wxWidgets's version.
> The behaviour I am addressing is not related to selecting an item in the
> list.
> When you open the "Search" dialog, SetSelection( 0 ) fills the combobox
> with the last item from the list. I want this item to be highlighted
> ("text selection") at that point. This is what SelectAll() does.
>
> On the two Ubuntu machines where I tested the product branch (14.04 and
> 15.04, PPA and self compiled) this text highlighting is not done. The
> text cursor is placed at position 0, nothing is selected.
Then there is a difference between windows and linux assuming that
ubuntu is using wxWidgets 3.0.2. If not, then it could be a difference
between wxWidgets versions. It's nice to know why I need to patch
something that works on one platform and not another. This can be
useful for other developers trying to solve similar problems. I'll
commit the patch.
>
> As far I could test, the correct behaviour is exhibited by Window's and
> Ubuntu's stable KiCad (circa 2013).
> I could not find when the regression happened by looking at the code,
> that is why I have a slight suspicion that wxWidgets changed its behaviour.
>
> Note that once the window is open, there is no problem when choosing
> another item in the list. All text is highlighted in this case.
>
> 2015-06-15 15:23 GMT+02:00 Wayne Stambaugh <stambaughw@xxxxxxxxx
> <mailto:stambaughw@xxxxxxxxx>>:
>
> Your patch doesn't seem to make any difference on windows builds. With
> or without your patch, the first item in the list is selected. Does
> this fix a platform specific problem in your case.
>
> Also, please read the KiCad coding policy and fix your code formatting.
>
> http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/md_Documentation_development_coding-style-policy.html
>
> On 6/14/2015 10:06 AM, Martin d'Allens wrote:
> > Hi all,
> >
> > Here is a small patch to select the textbox when the Find dialog is
> > opened. This is more consistent with most text editors as far as I can
> > tell, and allows typing the needle right after Ctrl+F.
> > It used to bother me and I figured it would be an easy introduction to
> > contributing :)
> >
> > Martin
> >
> > PS: The following page
> http://www.kicad-pcb.org/display/DEV/Getting+Started
> > reads "git bzr clone lp:inkscape inkscape" where "inkscape should
> > obviously be "kicad"
> >
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
References