more useable, in the face of wx 2.8 vs. 3.0 differences.
This commit is contained in:
parent
b177716b65
commit
9546c59fab
|
@ -29,7 +29,7 @@ EDA_LIST_DIALOG_BASE::EDA_LIST_DIALOG_BASE( wxWindow* parent, wxWindowID id, con
|
|||
m_staticText2->Wrap( -1 );
|
||||
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 ) );
|
||||
|
||||
bSizerMain->Add( m_listBox, 3, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
|
|
@ -399,7 +399,7 @@
|
|||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</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="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
|
|
|
@ -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 );
|
||||
if( row )
|
||||
return row->description;
|
||||
|
|
|
@ -467,7 +467,7 @@ public:
|
|||
* returns the library desicription from @a aNickname, or an empty string
|
||||
* if aNickname does not exist.
|
||||
*/
|
||||
const wxString& GetDescription( const wxString& aNickname );
|
||||
const wxString GetDescription( const wxString& aNickname );
|
||||
|
||||
/**
|
||||
* Function InsertRow
|
||||
|
|
|
@ -119,8 +119,6 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
|
|||
|
||||
MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName()
|
||||
{
|
||||
MODULE* Module;
|
||||
|
||||
if( GetBoard()->m_Modules == NULL )
|
||||
{
|
||||
DisplayError( this, _( "No Modules" ) );
|
||||
|
@ -128,10 +126,11 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName()
|
|||
}
|
||||
|
||||
wxArrayString listnames;
|
||||
Module = (MODULE*) GetBoard()->m_Modules;
|
||||
|
||||
for( ; Module != NULL; Module = (MODULE*) Module->Next() )
|
||||
listnames.Add( Module->GetReference() );
|
||||
MODULE* module;
|
||||
|
||||
for( module = GetBoard()->m_Modules; module; module = module->Next() )
|
||||
listnames.Add( module->GetReference() );
|
||||
|
||||
wxArrayString headers;
|
||||
headers.Add( wxT( "Module" ) );
|
||||
|
@ -151,15 +150,14 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName()
|
|||
return NULL;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
return Module;
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue