← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Add live footprint filtering in modview window

 

Oliver, this is neat and very helpful.

The greyed-out thing is a wx2.8 bug.  You can work around it by setting the
foreground color when updating the filter like this:

 void FOOTPRINT_VIEWER_FRAME::OnFilterUpdated( wxCommandEvent& event )
 {
+    // Workaround wx2.8 bug showing greyed color
+    if( m_searchBox->GetValue() != m_searchBox->GetDescriptiveText() )
+        m_searchBox->SetForegroundColour(
m_searchBox->GetDefaultAttributes().colFg );
+
     // Filter is non case sensitive
     wxString filter = m_searchBox->GetValue().Lower();

The searchbox handles resetting it to grey on idle() when the text is empty.

One downside of this patch is that the initial library load takes quite a
while (on my machine).  So everytime I want to change a footprint, I need
to wait 10-15 seconds for all libraries to load.  It seems like we should
be able to cache that and maybe (greedy here?) thread the load so that it
happens in the background when the schematic is opened?

-Seth


On Mon, Oct 30, 2017 at 12:45 AM, Chris Fiege <cfi@xxxxxxxxxxxxxx> wrote:

> Hi Oliver,
> I have tested your patchset against the current master.
>
> On 10/29/2017 02:37 PM, Oliver Walters wrote:
> > In the footprint viewer window it is often hard to find the exact
> footprint
> > you want across multiple libraries
> This looks great. Filtering by keywords is really good alternative to
> clicking in the
> library tree in those cases where you already know what you are looking
> for.
>
> >
> > The attached patch set adds a search filter input to the toolbar.
> I mentioned one thing testing your patchset on my Debian stretch:
> The text in your input box stays gray, even after entering a keyword.
> Switching the text
> to black would help in situations with "not so good" visibility.
> See the attached screen shot.
>
>
> --
> Chris
>
> _______________________________________________
> 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
>
>

Follow ups

References