Fix temp var values of actions not being accessible

This a bug introduced with ec3052c823.
This commit is contained in:
WarmUpTill
2026-04-03 13:21:25 +02:00
committed by WarmUpTill
parent b02259e926
commit df42538319
3 changed files with 22 additions and 0 deletions

View File

@@ -167,6 +167,24 @@ bool MacroSegment::IsTempVarInUse(const std::string &id) const
return false;
}
void MacroSegment::CopyTempVarValuesFrom(const MacroSegment &other)
{
for (const auto &src : other._tempVariables) {
for (auto &dst : _tempVariables) {
if (dst.ID() != src.ID()) {
continue;
}
auto value = src.Value();
if (value) {
dst.SetValue(*value);
} else {
dst.InvalidateValue();
}
break;
}
}
}
void MacroSegment::SetTempVarValue(const std::string &id,
const std::string &value)
{