Commit 76adcc60 authored by jean-pierre charras's avatar jean-pierre charras

Design rules dialog: use wxLC_VIRTUAL options in wxListBoxes to speed up nets...

Design rules dialog: use wxLC_VIRTUAL options in wxListBoxes to speed  up nets lists display (which was *very long* for boards with a lot of nets)
parents d00f3744 86210d10
......@@ -113,8 +113,10 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
description << wxT( "<p>" );
description << wxT( "<b><u>" ) << _( "Description" ) << wxT( "</u></b>" ); // bold & underlined font for caption
description << wxT(
"<p>The KiCad EDA Suite is a set of open source applications for the creation of electronic schematics and to design printed circuit boards.</p>" );
description << wxT( "<p>" ) <<
_(
"The KiCad EDA Suite is a set of open source applications for the creation of electronic schematics and to design printed circuit boards." )
<< wxT( "</p>" );
description << wxT( "</p>" );
......@@ -170,7 +172,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
<< HtmlNewline( 4 )
<< _( "The complete KiCad EDA Suite is released under the" ) << HtmlNewline( 2 )
<< HtmlHyperlink( wxT( "http://www.gnu.org/licenses" ),
_( "GNU General Public License version 2" ) )
_( "GNU General Public License (GPL) version 2" ) )
<< wxT( "</div>" );
info.SetLicense( license );
......@@ -201,7 +203,8 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
info.AddDeveloper( new Contributor( wxT( "Lorenzo Marcantonio" ), wxT( "lomarcan@tin.it" ) ) );
info.AddDeveloper( new Contributor( wxT( "Marco Serantoni" ), wxT( "marco.serantoni@gmail.com" ) ) );
info.AddDeveloper( new Contributor( wxT( "Marco Mattila" ), wxT( "marcom99@gmail.com" ) ) );
info.AddDeveloper( new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ) ) );
info.AddDeveloper( new Contributor( wxT( "Rafael Sokolowski" ),
wxT( "rafael.sokolowski@web.de" ) ) );
info.AddDeveloper( new Contributor( wxT( "Rok Markovic" ), wxT( "rok@kanardia.eu" ) ) );
info.AddDeveloper( new Contributor( wxT( "Tim Hanson" ), wxT( "sideskate@gmail.com" ) ) );
info.AddDeveloper( new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ) ) );
......
This diff is collapsed.
......@@ -76,7 +76,7 @@ private:
void CopyGlobalRulesToBoard();
void CopyDimensionsListsToBoard( );
void SetRoutableLayerStatus();
void FillListBoxWithNetNames( wxListCtrl* aListCtrl, const wxString& aNetClass );
void FillListBoxWithNetNames( NETS_LIST_CTRL* aListCtrl, const wxString& aNetClass );
void PrintCurrentSettings( );
/**
......@@ -96,9 +96,7 @@ private:
void setNetClass( const wxString& aNetName, const wxString& aClassName );
static void setRowItem( wxListCtrl* aListCtrl, int aRow, NETCUP* aNetAndClass );
void moveSelectedItems( wxListCtrl* src, const wxString& newClassName );
void moveSelectedItems( NETS_LIST_CTRL* src, const wxString& newClassName );
public:
......
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_DESIGN_RULES
///////////////////////////////////////////////////////////////////////////////
#ifndef __dialog_design_rules_aux_helper_class_h_
#define __dialog_design_rules_aux_helper_class_h_
#include <wx/listctrl.h>
/* helper class to display lists of nets and associated netclasses
* used in dialog design rules.
* It s needed because the 2 wxListCtlr used to display lists of nets
* use the wxLC_VIRTUAL option.
* The virtual wxString OnGetItemText(long item, long column) const method
* must be overlaid.
*/
class NETS_LIST_CTRL: public wxListCtrl
{
private:
wxArrayString m_Netnames; ///< an array to store the list of nets (column 0)
wxArrayString m_Classnames; ///< an array to store the list of netclasse (column 1)
public:
NETS_LIST_CTRL(wxWindow* parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxLC_ICON):
wxListCtrl( parent, id, pos, size, style )
{
};
NETS_LIST_CTRL()
{
};
void setRowItems(unsigned aRow, const wxString & aNetname, const wxString & aNetclassName );
void ClearList()
{
SetItemCount(0);
m_Netnames.Clear();
m_Classnames.Clear();
}
virtual wxString OnGetItemText(long item, long column) const;
};
#endif //__dialog_design_rules_aux_helper_class_h_
......@@ -5,6 +5,8 @@
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_design_rules_aux_helper_class.h"
#include "dialog_design_rules_base.h"
///////////////////////////////////////////////////////////////////////////
......@@ -99,7 +101,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_leftClassChoice->SetSelection( 0 );
leftNetSelectBoxSizer->Add( m_leftClassChoice, 0, wxEXPAND, 5 );
m_leftListCtrl = new wxListCtrl( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES|wxSUNKEN_BORDER );
m_leftListCtrl = new NETS_LIST_CTRL( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES|wxSUNKEN_BORDER );
m_leftListCtrl->SetMinSize( wxSize( 220,200 ) );
leftNetSelectBoxSizer->Add( m_leftListCtrl, 1, wxEXPAND|wxTOP, 5 );
......@@ -139,7 +141,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_rightClassChoice->SetSelection( 0 );
rghtNetSelectBoxSizer->Add( m_rightClassChoice, 0, wxEXPAND, 5 );
m_rightListCtrl = new wxListCtrl( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES|wxSUNKEN_BORDER );
m_rightListCtrl = new NETS_LIST_CTRL( m_panelNetClassesEditor, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES|wxSUNKEN_BORDER );
m_rightListCtrl->SetMinSize( wxSize( 220,-1 ) );
rghtNetSelectBoxSizer->Add( m_rightListCtrl, 1, wxEXPAND|wxTOP, 5 );
......
......@@ -558,8 +558,8 @@
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxLC_HRULES|wxLC_REPORT|wxLC_VRULES</property>
<property name="subclass"></property>
<property name="style">wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES</property>
<property name="subclass">NETS_LIST_CTRL; dialog_design_rules_aux_helper_class.h</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......@@ -908,8 +908,8 @@
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxLC_HRULES|wxLC_REPORT|wxLC_VRULES</property>
<property name="subclass"></property>
<property name="style">wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES</property>
<property name="subclass">NETS_LIST_CTRL; dialog_design_rules_aux_helper_class.h</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
......
......@@ -10,6 +10,8 @@
#include <wx/intl.h>
class NETS_LIST_CTRL;
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/string.h>
......@@ -60,13 +62,13 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
wxButton* m_removeButton;
wxButton* m_moveUpButton;
wxChoice* m_leftClassChoice;
wxListCtrl* m_leftListCtrl;
NETS_LIST_CTRL* m_leftListCtrl;
wxButton* m_buttonRightToLeft;
wxButton* m_buttonLeftToRight;
wxButton* m_buttonLeftSelAll;
wxButton* m_buttonRightSelAll;
wxChoice* m_rightClassChoice;
wxListCtrl* m_rightListCtrl;
NETS_LIST_CTRL* m_rightListCtrl;
wxPanel* m_panelGolbalDesignRules;
wxRadioBox* m_OptViaType;
wxStaticText* m_ViaMinTitle;
......
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