MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / OnValueCount

Method OnValueCount

src/widgets.cpp:335–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333 }
334
335 void OnValueCount(wxCommandEvent &)
336 {
337 int nrows = m_numVals->AsInteger();
338
339 if (nrows > 100) nrows = 100;
340 if (nrows < 2) nrows = 2;
341
342 m_grid->ResizeGrid(nrows,1);
343
344 for (int i=0;i<nrows;i++)
345 {
346 double dval;
347 m_grid->SetRowLabelValue(i,wxString::Format("%d", i+1));
348 if (m_grid->GetCellValue(i,0).ToDouble(&dval))
349 m_grid->SetCellValue(i,0,wxString::Format("%lg",dval));
350 else
351 m_grid->SetCellValue(i,0,"0");
352 }
353
354 m_numVals->SetValue( m_grid->GetNumberRows() );
355 }
356
357 void OnHelp( wxCommandEvent & )
358 {

Callers

nothing calls this directly

Calls 4

ResizeGridMethod · 0.80
GetCellValueMethod · 0.80
SetValueMethod · 0.45
GetNumberRowsMethod · 0.45

Tested by

no test coverage detected