| 513 | } |
| 514 | |
| 515 | void DistancePlotDlg::InitVariableCombobox(wxListBox* var_box) |
| 516 | { |
| 517 | var_box->Clear(); |
| 518 | wxArrayString var_items; |
| 519 | |
| 520 | std::vector<int> col_id_map; |
| 521 | TableInterface* table_int = project->GetTableInt(); |
| 522 | table_int->FillNumericColIdMap(col_id_map); |
| 523 | for (int i=0, iend=col_id_map.size(); i<iend; i++) { |
| 524 | int id = col_id_map[i]; |
| 525 | wxString name = table_int->GetColName(id); |
| 526 | if (table_int->IsColTimeVariant(id)) { |
| 527 | for (int t=0; t<table_int->GetColTimeSteps(id); t++) { |
| 528 | wxString nm = name; |
| 529 | nm << " (" << table_int->GetTimeString(t) << ")"; |
| 530 | name_to_nm[nm] = name; |
| 531 | name_to_tm_id[nm] = t; |
| 532 | var_items.Add(nm); |
| 533 | } |
| 534 | } else { |
| 535 | name_to_nm[name] = name; |
| 536 | name_to_tm_id[name] = 0; |
| 537 | var_items.Add(name); |
| 538 | } |
| 539 | } |
| 540 | if (!var_items.IsEmpty()) { |
| 541 | var_box->InsertItems(var_items,0); |
| 542 | } |
| 543 | } |
| 544 | |
| 545 | void DistancePlotDlg::GetSelectedVariables(wxListBox* var_box, |
| 546 | std::vector<std::vector<double> >& data, |
nothing calls this directly
no test coverage detected