kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #07274
Re: [PATCH]
Thank you.
Comments below.
On 12/11/2011 09:10 PM, Guillaume Simard wrote:
> === modified file 'cvpcb/cvframe.cpp'
> --- cvpcb/cvframe.cpp 2011-10-13 20:13:11 +0000
> +++ cvpcb/cvframe.cpp 2011-12-12 02:21:42 +0000
> @@ -525,6 +525,24 @@
> }
>
> m_FootprintList->SetFootprintFilteredList( &m_components[ selection ], m_footprints );
1) no spaces around selection.
> +
> + // * Preview of the already assigned footprint.
> + // Find the footprint that was already choosen for this component and select it.
> + wxString module = *(&m_components[ selection ].m_Module);
2) why not the following instead of the above line:
+ wxString module = m_components[selection].m_Module;
> + for (int ii = 0 ; ii < m_FootprintList->GetCount() ; ii++)
> + {
> + wxString FootprintName;
3) Please use a variable name that starts with a lowercase letter for automatics.
> + wxString msg = (*m_FootprintList->m_ActiveFootprintList)[ii];
> + msg.Trim( true );
> + msg.Trim( false );
> + FootprintName = msg.AfterFirst( wxChar( ' ' ) );
> +
> + if (module.Cmp(FootprintName) == 0)
> + m_FootprintList->SetSelection(ii, TRUE);
> + else
> + m_FootprintList->SetSelection(ii, FALSE);
> + }
> +
> SendMessageToEESCHEMA();
> DisplayStatus();
> }
I am unable to test this code, hoping someone else will.
Thank you.
References