| 467 | } |
| 468 | |
| 469 | void VariableGridData::SetValue(int row, int col, const wxString& value) |
| 470 | { |
| 471 | if (col == 0) |
| 472 | return; // no updating of variable name allowed here! |
| 473 | else if (col == 1) |
| 474 | return; // no updating of variable label allowed here! |
| 475 | else if ((col > 1) && (col < (int)(m_cases.size() + 2))) { |
| 476 | int lookup_row = row; |
| 477 | if (m_sorted) lookup_row = m_sorted_index[row]; |
| 478 | Case* c = GetCase(row, col); |
| 479 | wxString var_name; |
| 480 | size_t ndx_hybrid; |
| 481 | if (UpdateVarNameNdxHybrid(c, m_var_names[lookup_row], &var_name, &ndx_hybrid)) { |
| 482 | if (m_var_table_vec[col - 2][ndx_hybrid]->Get(var_name)) { |
| 483 | VarValue* vv = m_var_table_vec[col - 2][ndx_hybrid]->Get(var_name); |
| 484 | if (vv) { |
| 485 | VarValue::Parse(vv->Type(), value, *vv); |
| 486 | // updates ui from grid |
| 487 | m_cases[col - 2]->VariableChanged(var_name, ndx_hybrid); |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | |
| 495 |
nothing calls this directly
no test coverage detected