Code formatting cleanup.

This commit is contained in:
Jeff Young 2019-04-14 23:13:46 +01:00
parent d5f136cd7e
commit ef3f773f84
1 changed files with 27 additions and 32 deletions

View File

@ -22,11 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file dialog_select_net_from_list.cpp
* @brief methods to show available net names and select and highligth a net
*/
#include <fctsys.h>
#include <kicad_string.h>
#include <kicad_device_context.h>
@ -149,6 +144,7 @@ void DIALOG_SELECT_NET_FROM_LIST::buildNetsList()
if( !netFilter.IsEmpty() )
{
wxString netname = UnescapeString( net->GetNetname() );
if( filter.Find( netname.MakeUpper() ) == EDA_PATTERN_NOT_FOUND )
continue;
}
@ -191,10 +187,10 @@ void DIALOG_SELECT_NET_FROM_LIST::buildNetsList()
}
}
dataLine.push_back( wxVariant( wxString::Format( "%u", viaCount ) ) ); // vias
dataLine.push_back( wxVariant( wxString::Format( "%s", MessageTextFromValue( units, len ).c_str() ) ) ); // board
dataLine.push_back( wxVariant( wxString::Format( "%s", MessageTextFromValue( units, lenPadToDie ).c_str() ) ) ); // die
dataLine.push_back( wxVariant( wxString::Format( "%s", MessageTextFromValue( units, len + lenPadToDie ).c_str() ) ) ); // length
dataLine.push_back( wxVariant( wxString::Format( wxT( "%u" ), viaCount ) ) );
dataLine.push_back( wxVariant( MessageTextFromValue( units, len ) ) );
dataLine.push_back( wxVariant( MessageTextFromValue( units, lenPadToDie ) ) );
dataLine.push_back( wxVariant( MessageTextFromValue( units, len + lenPadToDie ) ) );
}
else // For the net 0 (unconnected pads), the pad count is not known
{
@ -205,7 +201,6 @@ void DIALOG_SELECT_NET_FROM_LIST::buildNetsList()
dataLine.push_back( wxVariant( wxT( "---" ) ) ); // length
}
m_netsList->AppendItem( dataLine );
}
@ -342,13 +337,13 @@ bool DIALOG_SELECT_NET_FROM_LIST::GetNetName( wxString& aName )
void DIALOG_SELECT_NET_FROM_LIST::onExport( wxMouseEvent& aEvent )
{
wxFileDialog
saveFileDialog(this, _( "Export file" ), "", "",
"Text files (*.txt)|*.txt", wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
if (saveFileDialog.ShowModal() == wxID_CANCEL)
wxFileDialog dlg( this, _( "Export file" ), "", "", "Text files (*.txt)|*.txt",
wxFD_SAVE|wxFD_OVERWRITE_PROMPT );
if( dlg.ShowModal() == wxID_CANCEL )
return;
wxTextFile f( saveFileDialog.GetPath() );
wxTextFile f( dlg.GetPath() );
f.Create();