| 840 | } |
| 841 | |
| 842 | void TempVarOutputMappingsWidget::WriteBackMappings() |
| 843 | { |
| 844 | if (_loading || !_segment) { |
| 845 | return; |
| 846 | } |
| 847 | std::vector<VarMapping> mappings; |
| 848 | for (const auto &row : _rows) { |
| 849 | VarMapping m; |
| 850 | const int idx = row.tempVarCombo->currentIndex(); |
| 851 | if (idx >= 0) { |
| 852 | m.tempVar = row.tempVarCombo->itemData(idx) |
| 853 | .value<TempVariableRef>(); |
| 854 | } |
| 855 | |
| 856 | auto item = row.varSelection->GetCurrentItem(); |
| 857 | if (!item) { |
| 858 | continue; |
| 859 | } |
| 860 | |
| 861 | m.variable = GetWeakVariableByName(item->Name()); |
| 862 | mappings.push_back(std::move(m)); |
| 863 | } |
| 864 | auto lock = LockContext(); |
| 865 | _segment->SetVarMappings(mappings); |
| 866 | } |
| 867 | |
| 868 | void TempVarOutputMappingsWidget::Rebuild() |
| 869 | { |
nothing calls this directly
no test coverage detected