Commit 9546c59f authored by Dick Hollenbeck's avatar Dick Hollenbeck

more useable, in the face of wx 2.8 vs. 3.0 differences.

parent b177716b
...@@ -29,7 +29,7 @@ EDA_LIST_DIALOG_BASE::EDA_LIST_DIALOG_BASE( wxWindow* parent, wxWindowID id, con ...@@ -29,7 +29,7 @@ EDA_LIST_DIALOG_BASE::EDA_LIST_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
m_staticText2->Wrap( -1 ); m_staticText2->Wrap( -1 );
bSizerMain->Add( m_staticText2, 0, wxRIGHT|wxLEFT, 5 ); bSizerMain->Add( m_staticText2, 0, wxRIGHT|wxLEFT, 5 );
m_listBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxALWAYS_SHOW_SB|wxVSCROLL ); m_listBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxALWAYS_SHOW_SB|wxVSCROLL );
m_listBox->SetMinSize( wxSize( -1,200 ) ); m_listBox->SetMinSize( wxSize( -1,200 ) );
bSizerMain->Add( m_listBox, 3, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); bSizerMain->Add( m_listBox, 3, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
......
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
<property name="resize">Resizable</property> <property name="resize">Resizable</property>
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxLC_REPORT|wxLC_SINGLE_SEL</property> <property name="style">wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
......
...@@ -139,9 +139,9 @@ bool FP_LIB_TABLE::IsFootprintLibWritable( const wxString& aNickname ) ...@@ -139,9 +139,9 @@ bool FP_LIB_TABLE::IsFootprintLibWritable( const wxString& aNickname )
} }
const wxString& FP_LIB_TABLE::GetDescription( const wxString& aNickname ) const wxString FP_LIB_TABLE::GetDescription( const wxString& aNickname )
{ {
// use no exception form of find row: // use "no exception" form of find row:
const ROW* row = findRow( aNickname ); const ROW* row = findRow( aNickname );
if( row ) if( row )
return row->description; return row->description;
......
...@@ -467,7 +467,7 @@ public: ...@@ -467,7 +467,7 @@ public:
* returns the library desicription from @a aNickname, or an empty string * returns the library desicription from @a aNickname, or an empty string
* if aNickname does not exist. * if aNickname does not exist.
*/ */
const wxString& GetDescription( const wxString& aNickname ); const wxString GetDescription( const wxString& aNickname );
/** /**
* Function InsertRow * Function InsertRow
......
...@@ -119,8 +119,6 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, ...@@ -119,8 +119,6 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName() MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName()
{ {
MODULE* Module;
if( GetBoard()->m_Modules == NULL ) if( GetBoard()->m_Modules == NULL )
{ {
DisplayError( this, _( "No Modules" ) ); DisplayError( this, _( "No Modules" ) );
...@@ -128,10 +126,11 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName() ...@@ -128,10 +126,11 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName()
} }
wxArrayString listnames; wxArrayString listnames;
Module = (MODULE*) GetBoard()->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Next() ) MODULE* module;
listnames.Add( Module->GetReference() );
for( module = GetBoard()->m_Modules; module; module = module->Next() )
listnames.Add( module->GetReference() );
wxArrayString headers; wxArrayString headers;
headers.Add( wxT( "Module" ) ); headers.Add( wxT( "Module" ) );
...@@ -151,15 +150,14 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName() ...@@ -151,15 +150,14 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName()
return NULL; return NULL;
wxString ref = dlg.GetTextSelection(); wxString ref = dlg.GetTextSelection();
Module = (MODULE*) GetBoard()->m_Modules;
for( ; Module != NULL; Module = Module->Next() ) for( module = GetBoard()->m_Modules; module; module = module->Next() )
{ {
if( Module->GetReference() == ref ) if( module->GetReference() == ref )
break; break;
} }
return Module; return module;
} }
......
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