MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / WriteBackMappings

Method WriteBackMappings

lib/utils/temp-variable.cpp:842–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840}
841
842void 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
868void TempVarOutputMappingsWidget::Rebuild()
869{

Callers

nothing calls this directly

Calls 5

GetWeakVariableByNameFunction · 0.85
LockContextFunction · 0.85
GetCurrentItemMethod · 0.80
SetVarMappingsMethod · 0.80
NameMethod · 0.45

Tested by

no test coverage detected