← Back to team overview

kicad-developers team mailing list archive

Re: PATCH: Component chooser now with thumbnail image of the component. And Unit select.

 

On 2/18/2014 2:40 AM, Henner Zeller wrote:
> Hi,
> 
> This is an update patch to the new component chooser containing the
> planned followup-change to display a mini-preview of the component.
> Clicking on that box opens the 'big' component browser (Also fixes
> [Bug 1280567]). (Since we already can preselect a lot, it would be
> good if that browser would take these defaults; planned for another
> patch).
> 
> Also, the component browser now allows to choose not only the
> component itself, but the units (or 'Gates' or 'Parts' however you'd
> call them). The four NANDs in a 7400 for instance, are provided in a
> sub-tree to select (the preview also shows the right unit).
> 
> The best part of that: the chosen unit is also kept in the history. So
> if you previously selected 'Unit B' of the 7400, you now can press 'a'
> (add component - opens dialog), cursor-down (go from 'Unit B' to 'Unit
> C') and ENTER: now you can place 'Unit C'. I find that this very much
> speeds up the way I choose components.
> 
> Also now: internally it works with the Aliases instead of the
> Components - the previous implementation just gave out component
> names, but it should've given out Alias names (so even if you chose
> 74HC00, you got 74LS00. This is now fixed).
> 
> The preview is based on the suggestion by jp; and like he predicted
> there were several places that I needed to change to properly deal
> with NULL-aPanels. Included in this patch..
> 
> Commit message:
>  * Allow to select units in components that have more than one right
> in the component chooser dialog.
>  * Keep chosen unit in history.
>  * Show preview of current component-unit as thumbnail image next to
> the description box.
>  * Fixes 1280567
> 
> View here:
> https://github.com/hzeller/kicad/compare/master...component-selection#files_bucket
> 
> Download here:
> https://github.com/hzeller/kicad/compare/master...component-selection.diff
> 
> -h
> 

Henner,

Nice work.  This is infinitely better than the old component selection
dialog.  I will commit this patch as is if no one has any objections but
I have a few comments and one minor bug.  On windows builds with
wxWidget 3.0.0, the component view panel does not update when a new
component is selected.  When the dialog is closed and reopen it, then
the selected component is shown correctly.

I could not open the dialog fbp file with wxFormBuilder 3.4.0 or 3.3.04.
 I got an error saying that the dialog was created with a newer version
of wxFormBuilder.  What version of wxFormBuilder are you using and if
it's greater than 3.4.0 where did you get it?  The latest version on the
wxFormBuilder website is 3.4.0.

One minor comment on your dialog layout, take a look at some of the
layout space in some of the other dialogs.  The dialog buttons do not
have enough padding between them and the dialog frame.  I've been using
the GNOME HIG at
https://developer.gnome.org/hig-book/stable/design-window.html.en for my
dialog design.

I also found a few coding policy issues:

* if ( foo ) should be if( foo )
* In cpp file, functions should be separated by two lines.
* Control blocks (if, while, BOOST_FOREACH, etc.) should be have blank
lines before and after so it's easy to see where each block begins and ends.
* GetChars(foo) should be GetChars( foo ).

Thanks,

Wayne


Follow ups

References