~tuomasvaherkoski/kicad/kicad

« back to all changes in this revision

Viewing changes to pcbnew/footprint_wizard_frame.cpp

  • Committer: Miguel Angel Ajo
  • Date: 2013-03-15 14:50:54 UTC
  • Revision ID: miguelangel@nbee.es-20130315145054-49ov2rkxf8cr50uf
Fixed wxGrid re-creation and missing icon for dialog

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
    m_showAxis = true;         // true to draw axis.
124
124
 
125
125
    // Give an icon
126
 
    wxIcon  icon;
127
 
    icon.CopyFromBitmap( KiBitmap( module_wizard_xpm) );
128
 
    SetIcon( icon );
 
126
 
 
127
    // Disabled for now, it raises an assert error in wxwidgets
 
128
    // wxIcon  icon;
 
129
    // icon.CopyFromBitmap( KiBitmap( module_wizard_xpm) );
 
130
    // SetIcon( icon );
129
131
 
130
132
    m_HotkeysZoomAndGridList = g_Module_Viewer_Hokeys_Descr;
131
133
    m_FootprintWizard = NULL;
185
187
 
186
188
    m_ParameterGridWindow->SetSashVisible( wxSASH_RIGHT, true );
187
189
    m_ParameterGridWindow->SetExtraBorderSize( EXTRA_BORDER_SIZE );
188
 
    m_ParameterGrid = new wxGrid(m_ParameterGridWindow,
 
190
    m_ParameterGrid = new wxGrid( m_ParameterGridWindow,
189
191
                                 ID_FOOTPRINT_WIZARD_PARAMETER_LIST,
190
 
                                 wxPoint(0,0),wxDefaultSize);
 
192
                                 wxPoint( 0 , 0 ),
 
193
                                 wxDefaultSize );
 
194
 
 
195
    m_ParameterGrid->CreateGrid( 1, 3 );
 
196
 
 
197
    // Columns
 
198
    m_ParameterGrid->AutoSizeColumns();
 
199
    m_ParameterGrid->SetColLabelSize( 20 );
 
200
    m_ParameterGrid->SetColLabelValue( 0, _("Parameter") );
 
201
    m_ParameterGrid->SetColLabelValue( 1, _("Value") );
 
202
    m_ParameterGrid->SetColLabelValue( 2, _("Units") );
 
203
    m_ParameterGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
 
204
 
 
205
 
191
206
 
192
207
    ReCreatePageList();
193
208
 
406
421
 
407
422
    m_ParameterGrid->ClearGrid();
408
423
 
409
 
    // Columns
410
 
    m_ParameterGrid->AutoSizeColumns();
411
 
    m_ParameterGrid->SetColLabelSize( 20 );
412
 
    m_ParameterGrid->SetColLabelValue( 0, _("Parameter") );
413
 
    m_ParameterGrid->SetColLabelValue( 1, _("Value") );
414
 
    m_ParameterGrid->SetColLabelValue( 2, _("Units") );
415
 
    m_ParameterGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
416
424
 
417
425
    // Rows
418
426
    m_ParameterGrid->AutoSizeRows();
421
429
    m_ParameterGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
422
430
 
423
431
    // Get the list of names, values, and types
424
 
    wxArrayString fpList = m_FootprintWizard->GetParameterNames(page);
425
 
    wxArrayString fvList = m_FootprintWizard->GetParameterValues(page);
426
 
    wxArrayString ptList = m_FootprintWizard->GetParameterTypes(page);
 
432
    wxArrayString fpList = m_FootprintWizard->GetParameterNames( page );
 
433
    wxArrayString fvList = m_FootprintWizard->GetParameterValues( page );
 
434
    wxArrayString ptList = m_FootprintWizard->GetParameterTypes( page );
427
435
 
428
436
    // Dimension the wxGrid
429
 
    m_ParameterGrid->CreateGrid(fpList.size(),3);
 
437
    m_ParameterGrid->DeleteRows( 0, m_ParameterGrid->GetNumberRows() );
 
438
    m_ParameterGrid->AppendRows( fpList.size() );
430
439
 
431
440
    for (unsigned int i=0; i<fpList.size(); i++)
432
441
    {