Commit 3d834342 authored by jean-pierre charras's avatar jean-pierre charras

Very minor fixes.

parent 49aff8bc
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2008-2011 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
* *
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "dialog_erc_listbox.h"
#include "dialog_erc_base.h" #include "dialog_erc_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
...@@ -78,6 +80,7 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin ...@@ -78,6 +80,7 @@ DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxStrin
bSizerMessages->Add( m_titleMessages, 0, wxRIGHT|wxLEFT, 5 ); bSizerMessages->Add( m_titleMessages, 0, wxRIGHT|wxLEFT, 5 );
m_MessagesList = new wxTextCtrl( m_PanelERC, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY ); m_MessagesList = new wxTextCtrl( m_PanelERC, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
m_MessagesList->SetMaxLength( 0 );
bSizerMessages->Add( m_MessagesList, 1, wxEXPAND|wxLEFT, 5 ); bSizerMessages->Add( m_MessagesList, 1, wxEXPAND|wxLEFT, 5 );
......
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">0</property> <property name="relative_path">0</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
...@@ -407,7 +409,7 @@ ...@@ -407,7 +409,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property> <property name="maxlength"></property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
...@@ -581,7 +583,7 @@ ...@@ -581,7 +583,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property> <property name="maxlength"></property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
...@@ -755,7 +757,7 @@ ...@@ -755,7 +757,7 @@
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="maxlength">0</property> <property name="maxlength"></property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
#include <wx/artprov.h> #include <wx/artprov.h>
#include <wx/xrc/xmlres.h> #include <wx/xrc/xmlres.h>
#include <wx/intl.h> #include <wx/intl.h>
#include "dialog_erc_listbox.h" class DIALOG_SHIM;
class ERC_HTML_LISTBOX;
#include "dialog_shim.h" #include "dialog_shim.h"
#include <wx/string.h> #include <wx/string.h>
#include <wx/stattext.h> #include <wx/stattext.h>
......
...@@ -1289,12 +1289,20 @@ MODULE* BOARD::FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeSt ...@@ -1289,12 +1289,20 @@ MODULE* BOARD::FindModule( const wxString& aRefOrTimeStamp, bool aSearchByTimeSt
} }
// Sort nets by decreasing pad count // Sort nets by decreasing pad count. For same pad count, sort by alphabetic names
static bool s_SortByNodes( const NETINFO_ITEM* a, const NETINFO_ITEM* b ) static bool sortNetsByNodes( const NETINFO_ITEM* a, const NETINFO_ITEM* b )
{ {
if( b->GetNodesCount() == a->GetNodesCount() )
return a->GetNetname() < b->GetNetname();
return b->GetNodesCount() < a->GetNodesCount(); return b->GetNodesCount() < a->GetNodesCount();
} }
// Sort nets by alphabetic names
static bool sortNetsByNames( const NETINFO_ITEM* a, const NETINFO_ITEM* b )
{
return a->GetNetname() < b->GetNetname();
}
int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ) int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount )
{ {
...@@ -1315,7 +1323,9 @@ int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount ) ...@@ -1315,7 +1323,9 @@ int BOARD::SortedNetnamesList( wxArrayString& aNames, bool aSortbyPadsCount )
// sort the list // sort the list
if( aSortbyPadsCount ) if( aSortbyPadsCount )
sort( netBuffer.begin(), netBuffer.end(), s_SortByNodes ); sort( netBuffer.begin(), netBuffer.end(), sortNetsByNodes );
else
sort( netBuffer.begin(), netBuffer.end(), sortNetsByNames );
for( unsigned ii = 0; ii < netBuffer.size(); ii++ ) for( unsigned ii = 0; ii < netBuffer.size(); ii++ )
aNames.Add( netBuffer[ii]->GetNetname() ); aNames.Add( netBuffer[ii]->GetNetname() );
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <wx/wx.h> #include <wx/wx.h>
#include <fctsys.h> #include <fctsys.h>
//#include <pgm_base.h>
#include <kiface_i.h> #include <kiface_i.h>
#include <confirm.h> #include <confirm.h>
#include <PolyLine.h> #include <PolyLine.h>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -64,7 +64,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i ...@@ -64,7 +64,7 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
m_staticText16->Wrap( -1 ); m_staticText16->Wrap( -1 );
m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 ); m_NetSortOptSizer->Add( m_staticText16, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (advanced)"), _("Filtered (alphabetical)"), _("Filtered (advanced)") }; wxString m_NetDisplayOptionChoices[] = { _("Show all (alphabetical)"), _("Show all (pad count)"), _("Filtered (alphabetical)"), _("Filtered (pad count)") };
int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString ); int m_NetDisplayOptionNChoices = sizeof( m_NetDisplayOptionChoices ) / sizeof( wxString );
m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 ); m_NetDisplayOption = new wxChoice( this, ID_M_NETDISPLAYOPTION, wxDefaultPosition, wxDefaultSize, m_NetDisplayOptionNChoices, m_NetDisplayOptionChoices, 0 );
m_NetDisplayOption->SetSelection( 0 ); m_NetDisplayOption->SetSelection( 0 );
......
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
...@@ -594,7 +596,7 @@ ...@@ -594,7 +596,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="choices">&quot;Show all (alphabetical)&quot; &quot;Show all (advanced)&quot; &quot;Filtered (alphabetical)&quot; &quot;Filtered (advanced)&quot;</property> <property name="choices">&quot;Show all (alphabetical)&quot; &quot;Show all (pad count)&quot; &quot;Filtered (alphabetical)&quot; &quot;Filtered (pad count)&quot;</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
......
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