diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-03 13:54:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-03 13:54:10 +0100 |
| commit | 0642259361b18530110aa6a28e27c3646f2e7da6 (patch) | |
| tree | c5a4d5e39ed02c542ea3a412bb6aace326a576fa /src | |
| parent | 194bfb968181e21c52a2ed338825291c6841a3d0 (diff) | |
Preserve row names across update_cells().
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/audio_mapping_view.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wx/audio_mapping_view.cc b/src/wx/audio_mapping_view.cc index 8f55043be..fc2caf0f7 100644 --- a/src/wx/audio_mapping_view.cc +++ b/src/wx/audio_mapping_view.cc @@ -259,6 +259,11 @@ AudioMappingView::set_output_channels (vector<string> const & names) void AudioMappingView::update_cells () { + vector<string> row_names; + for (int i = 0; i < _grid->GetNumberRows (); ++i) { + row_names.push_back (wx_to_std (_grid->GetCellValue (i, 0))); + } + if (_grid->GetNumberRows ()) { _grid->DeleteRows (0, _grid->GetNumberRows ()); } @@ -272,6 +277,9 @@ AudioMappingView::update_cells () } for (int i = 0; i < _map.input_channels(); ++i) { + if (i < int (row_names.size ())) { + _grid->SetCellValue (i, 0, std_to_wx (row_names[i])); + } for (int j = 1; j < _grid->GetNumberCols(); ++j) { _grid->SetCellValue (i, j, std_to_wx (raw_convert<string> (_map.get (i, j - 1)))); } |
