Commit 784c0420 authored by jean-pierre charras's avatar jean-pierre charras

Finish work to enhance annotation algorithm.

Fix a minor warning when starting Kicad in debug mode (wxWidgets 2.9.1 specific)
parent 92c69a9c
......@@ -680,7 +680,11 @@ bool WinEDA_App::SetLanguage( bool first_time )
delete m_Locale;
m_Locale = new wxLocale;
#if wxCHECK_VERSION( 2, 9, 0 )
if( !m_Locale->Init( m_LanguageId ) )
#else
if( !m_Locale->Init( m_LanguageId, wxLOCALE_CONV_ENCODING ) )
#endif
{
wxLogDebug( wxT("This language is not supported by the system.") );
......
This diff is collapsed.
......@@ -226,6 +226,39 @@ public:
* When annotating, some or all components are not annotated,
* i.e. ref is only U or R, with no number.
*/
/**
* Function SplitReferences
* attempts to split all reference designators into a name (U) and number (1). If the
* last character is '?' or not a digit, the reference is tagged as not annotated.
* For components with multiple parts per package that are not already annotated, set
* m_Unit to a max value (0x7FFFFFFF).
* @see SCH_REFERENCE::Split()
*/
void SplitReferences()
{
for( unsigned ii = 0; ii < GetCount(); ii++ )
componentFlatList[ii].Split();
}
/**
* function UpdateAnnotation
* Update the reference components for the schematic project (or the current sheet)
* Note: this function does not calculate the reference numbers
* stored in m_NumRef
* So, it must be called after calcultaion of new reference numbers
* @see SCH_REFERENCE::Annotate()
*/
void UpdateAnnotation()
{
/* update the reference numbers */
for( unsigned ii = 0; ii < GetCount(); ii++ )
{
componentFlatList[ii].Annotate();
}
}
/**
* Function SortCmpByXCoordinate
* sort the flat list by X coordinates.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment