← Back to team overview

kicad-developers team mailing list archive

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

 

On 10/30/2017 1:16 PM, Seth Hillbrand wrote:
> 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.

Don't you mean wx 3.0?  CMake should not even generate the build
configuration files without wx 3.0 or greater.

> 
> 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?

There is already threaded footprint caching code used in the component
chooser dialog.  I would imagine it would be useful in this case.  Users
are not going to tolerate UI freezes of 10-15 seconds waiting for the
filter to update.  If this is the case, I retract my original approval.

> 
> -Seth
> 
> 
> On Mon, Oct 30, 2017 at 12:45 AM, Chris Fiege <cfi@xxxxxxxxxxxxxx
> <mailto: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
>     <https://launchpad.net/~kicad-developers>
>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     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
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


Follow ups

References