Correct some formatting issues.

This commit is contained in:
Jeff Young 2020-04-06 12:41:52 +01:00
parent 05d070a0c9
commit 76bbb71402
3 changed files with 25 additions and 25 deletions

View File

@ -92,66 +92,66 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
std::function<bool( wxString* )> wsResolver =
[ this ]( wxString* token ) -> bool
{
if( token->IsSameAs( wxT( "KICAD_VERSION" ) ))
if( token->IsSameAs( wxT( "KICAD_VERSION" ) ) )
{
*token = wxString::Format( wxT( "%s%s %s" ),
productName,
Pgm().App().GetAppName(),
GetBuildVersion());
GetBuildVersion() );
return true;
}
else if( token->IsSameAs( wxT( "#" ) ))
else if( token->IsSameAs( wxT( "#" ) ) )
{
*token = wxString::Format( wxT( "%d" ), m_sheetNumber );
return true;
}
else if( token->IsSameAs( wxT( "##" ) ))
else if( token->IsSameAs( wxT( "##" ) ) )
{
*token = wxString::Format( wxT( "%d" ), m_sheetCount );
return true;
}
else if( token->IsSameAs( wxT( "SHEETNAME" ) ))
else if( token->IsSameAs( wxT( "SHEETNAME" ) ) )
{
*token = m_sheetFullName;
return true;
}
else if( token->IsSameAs( wxT( "FILENAME" ) ))
else if( token->IsSameAs( wxT( "FILENAME" ) ) )
{
wxFileName fn( m_fileName );
*token = fn.GetFullName();
return true;
}
else if( token->IsSameAs( wxT( "PAPER" ) ))
else if( token->IsSameAs( wxT( "PAPER" ) ) )
{
*token = m_paperFormat ? *m_paperFormat : wxString( "" );
return true;
}
else if( token->IsSameAs( wxT( "LAYER" ) ))
else if( token->IsSameAs( wxT( "LAYER" ) ) )
{
*token = m_sheetLayer ? *m_sheetLayer : wxString( "" );
return true;
}
else if( token->IsSameAs( wxT( "ISSUE_DATE" ) ))
else if( token->IsSameAs( wxT( "ISSUE_DATE" ) ) )
{
*token = m_titleBlock ? m_titleBlock->GetDate() : wxString( "" );
return true;
}
else if( token->IsSameAs( wxT( "REVISION" ) ))
else if( token->IsSameAs( wxT( "REVISION" ) ) )
{
*token = m_titleBlock ? m_titleBlock->GetRevision() : wxString( "" );
return true;
}
else if( token->IsSameAs( wxT( "TITLE" ) ))
else if( token->IsSameAs( wxT( "TITLE" ) ) )
{
*token = m_titleBlock ? m_titleBlock->GetTitle() : wxString( "" );
return true;
}
else if( token->IsSameAs( wxT( "COMPANY" ) ))
else if( token->IsSameAs( wxT( "COMPANY" ) ) )
{
*token = m_titleBlock ? m_titleBlock->GetCompany() : wxString( "" );
return true;
}
else if( token->Left( token->Len() - 1 ).IsSameAs( wxT( "COMMENT" ) ))
else if( token->Left( token->Len() - 1 ).IsSameAs( wxT( "COMMENT" ) ) )
{
wxChar c = token->Last();

View File

@ -82,7 +82,7 @@ wxString SCH_FIELD::GetShownText() const
for( int i = 0; i < MANDATORY_FIELDS; ++i )
{
if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper()))
if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper() ) )
{
// silently drop recursive references
if( &fields[ i ] == this )
@ -96,8 +96,8 @@ wxString SCH_FIELD::GetShownText() const
for( size_t i = MANDATORY_FIELDS; i < fields.size(); ++i )
{
if( token->IsSameAs( fields[ i ].GetName())
|| token->IsSameAs( fields[ i ].GetName().Upper()))
if( token->IsSameAs( fields[ i ].GetName() )
|| token->IsSameAs( fields[ i ].GetName().Upper() ) )
{
// silently drop recursive references
if( &fields[ i ] == this )
@ -109,7 +109,7 @@ wxString SCH_FIELD::GetShownText() const
}
}
if( token->IsSameAs( wxT( "FOOTPRINT_LIBRARY" ) ))
if( token->IsSameAs( wxT( "FOOTPRINT_LIBRARY" ) ) )
{
SCH_FIELD& f = component->GetFields()[ FOOTPRINT ];
wxArrayString parts = wxSplit( f.GetText(), ':' );
@ -117,7 +117,7 @@ wxString SCH_FIELD::GetShownText() const
*token = parts[ 0 ];
return true;
}
else if( token->IsSameAs( wxT( "FOOTPRINT_NAME" ) ))
else if( token->IsSameAs( wxT( "FOOTPRINT_NAME" ) ) )
{
SCH_FIELD& f = component->GetFields()[ FOOTPRINT ];
wxArrayString parts = wxSplit( f.GetText(), ':' );
@ -125,9 +125,9 @@ wxString SCH_FIELD::GetShownText() const
*token = parts[ std::min( 1, (int) parts.size() - 1 ) ];
return true;
}
else if( token->IsSameAs( wxT( "UNIT" ) ))
else if( token->IsSameAs( wxT( "UNIT" ) ) )
{
*token = LIB_PART::SubReference( component->GetUnit());
*token = LIB_PART::SubReference( component->GetUnit() );
return true;
}
@ -142,7 +142,7 @@ wxString SCH_FIELD::GetShownText() const
for( int i = 0; i < SHEET_MANDATORY_FIELDS; ++i )
{
if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper()))
if( token->IsSameAs( fields[ i ].GetCanonicalName().Upper() ) )
{
// silently drop recursive references
if( &fields[ i ] == this )
@ -156,7 +156,7 @@ wxString SCH_FIELD::GetShownText() const
for( size_t i = SHEET_MANDATORY_FIELDS; i < fields.size(); ++i )
{
if( token->IsSameAs( fields[ i ].GetName()))
if( token->IsSameAs( fields[ i ].GetName() ) )
{
// silently drop recursive references
if( &fields[ i ] == this )

View File

@ -501,17 +501,17 @@ wxString TEXTE_MODULE::GetShownText() const
{
if( module )
{
if( token->IsSameAs( wxT( "REFERENCE" ) ))
if( token->IsSameAs( wxT( "REFERENCE" ) ) )
{
*token = module->GetReference();
return true;
}
else if( token->IsSameAs( wxT( "VALUE" ) ))
else if( token->IsSameAs( wxT( "VALUE" ) ) )
{
*token = module->GetValue();
return true;
}
else if( token->IsSameAs( wxT( "LAYER" ) ))
else if( token->IsSameAs( wxT( "LAYER" ) ) )
{
*token = GetLayerName();
return true;