Type-in filter on net comboboxes

Bug #1779854 reported by Hildo Guillardi Júnior on 2018-07-03
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Wishlist
Jeff Young

Bug Description

The "Track & Via Properties" and others proprieties that allow to select Nets could allow filter by type the start letters of the net name.
Sometimes I put manually a via and have to search in big list by "GNDD", as example.

tags: added: feature.request
Nick Østergaard (nickoe) wrote :

Please add version info

Sure, today last nightly:

Application: kicad
Version: 5.0.0-rc3-unknown-101b68b~65~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-128-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Jeff Young (jeyjey) on 2018-07-05
summary: - Type and filter on net select in "Track & Via Properties"
+ Type-in filter on net comboboxes
Changed in kicad:
status: New → Triaged
importance: Undecided → Wishlist

Yes @jeyjey, exactly this is my propose.
Maybe creating a class that heritage the wx.combobox, filtering the results to show in the list, but keeping a internal memory with full list.
This make the selection quicker.

Useful for at least nets and label values; probably others too.

summary: - Type-in filter on net comboboxes
+ Type-in filter on comboboxes
Jeff Young (jeyjey) wrote :

This turned out to be more specific to nets than expected, so I set the title back.

summary: - Type-in filter on comboboxes
+ Type-in filter on net comboboxes
Changed in kicad:
status: Triaged → In Progress
assignee: nobody → Jeff Young (jeyjey)
Jeff Young (jeyjey) wrote :

I had a lot of trouble getting the popup menu highlighting to work on OSX. Could someone please check this on GTK and MSW and let me know if it looks OK? Thanks.

Jeff Young (jeyjey) wrote :

@Nick, what is wxComboCtrl defined as on MSW? It appears to be choking on it....

Jeff Young (jeyjey) wrote :

The wxWidgets documentation has a picture of it on MSW, so it must be there in some form or another....

Nick Østergaard (nickoe) wrote :

@Jeff, sorry. I forgot to mention I also applied the patch for linux and I see similar if not the same build errors. I just linked the windows log as I had that online. Maybe you are missing something your the patch?

Jeff Young (jeyjey) wrote :

@Nick, ahh, it's probably OSX's overly-lenient #include infrastructure that's at play here then.

I've attached a more recent version of the patch. There are a bunch of other changes, but the important one for building is the #include change in net_selector.h.

Let me know if this one gives any more joy.

KiCad Janitor (kicad-janitor) wrote :

Fixed in revision ec9d38e21fbffdc46cda9cbfa942619e8a40e6e1
https://git.launchpad.net/kicad/patch/?id=ec9d38e21fbffdc46cda9cbfa942619e8a40e6e1

Changed in kicad:
status: In Progress → Fix Committed
Jeff Young (jeyjey) wrote :

I went ahead and merged the most recent version. Let me know if you see any issues.

@jey, thanks by the tip on the other issue (#1782660), understanding better the standardization and procedures here.
Today I had access to this implementation on Nightly and it was exactly what I was thinking when give this idea.

Just to check, I am not able to type in the filter text box.
Appear that the focus is set to this text box but it is not able to allow type (is gray, see the screen attached).

My current version:
Application: kicad
Version: 6.0.0-rc1-unknown-32d262b~66~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.15.0-33-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Jeff Young (jeyjey) wrote :

Well, rats, I was hoping that bug was OSX-specific. It's a bug in wxWidgets that I was able to work around on OSX because we have our own version of wxWidgets. But we ship the standard one for GTK and MSW (which are in general much less buggy).

@Devs, can anyone try this out on MSW?

Wayne Stambaugh (stambaughw) wrote :

@Jeff, I just tested this on windows and no dice. There is no type ahead filtering that I can get to work.

This filter could also be added in the "Label Properties" dialog on Eeschema.

Oleg Endo (oleg.endo) wrote :

I'm just trying this out on Ubuntu 18.
The text in the text input field is grayed out. I can type in only one character. It is possible to paste a string with more than one character into the text input, but no filtering is applied.

Maciej Suminski (orsonmmz) wrote :

I confirm Oleg's report. Perhaps we could go the same way as with the model selector in Spice Model Editor dialog in eeschema [1]?

1. https://github.com/KiCad/kicad-source-mirror/blob/master/eeschema/dialogs/dialog_spice_model.cpp#L677

In Ubuntu 16 is not even possible to paste a string.

Jeff Young (jeyjey) wrote :

How do we feel about wxWidgets patches?

The OSX version works because we have our own wxWidgets build and so I was able to patch around the issue. I thought we had gotten rid of all the patches on the other platforms, but I see that there are still 2 in the tree, so perhaps adding a 3rd wouldn't be terrible....

(The problem with autocomplete is that while it works OK with something like /5V, it works much less well with the slew of nets starting with "Net-".)

How about submitting the KiCad wxWidgets patches to the wx team? Could it be better for a long time support and to not overload the KiCad developer with "future not compatibility"?

Jeff Young (jeyjey) wrote :

Their "live" branch is well ahead of the version we use so it's quite difficult to get them to make changes in our version. (And some of the bugs we fix are already fixed in their master.)

Understood, so the most convenient is create our own patch.
Is there some road map of KiCad for update the wx version used? (And by consequence Gtk2 to Gtk3)

Wayne Stambaugh (stambaughw) wrote :

@Jeff, we abandoned the idea of keeping patches for wxwidgets because getting upstream linux distros to build a custom version of wxwidgets wasn't practical so resurrecting it is not a good idea. The short term fix is to create a custom control derived from the wxwidgets control and make any behavioral changes by overriding the necessary object methods and/or event handlers if possible. The long term fix is to submit a patch to wxwidgets which hopefully will get accepted then we can remove the custom control when we switch over to the version of wxwidgets that contains the fix.

Frank Severinsen (shack) wrote :

I just found this bug as well, should it be changed from "fix committed"?

I don't know how to proceed in this specific case. Maybe tag to v6 branch milestone. @jeyjey should know.

Jeff Young (jeyjey) wrote :

There's too much in this report (from the original feature request to several platform-specific issues, some of which have been fixed).

If there's still stuff outstanding, please log another bug. (Note however that this is already a bug for GTK-specific focus issues: https://bugs.launchpad.net/kicad/+bug/1797680.)

Changed in kicad:
milestone: none → 5.1.0
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.