mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 19:58:49 -05:00
Rework temp var mapping handling on copy of macro segments
This commit is contained in:
@@ -57,20 +57,20 @@ void MacroSegment::SetVarMappings(const std::vector<VarMapping> &mappings)
|
||||
IncrementTempVarInUseGeneration();
|
||||
}
|
||||
|
||||
void MacroSegment::FixupVarMappingRefs(const MacroSegment *originalSegment)
|
||||
void MacroSegment::FixupVarMappingRefs()
|
||||
{
|
||||
for (auto &mapping : _varMappings) {
|
||||
auto refSeg = mapping.tempVar._segment.lock();
|
||||
if (refSeg.get() != originalSegment) {
|
||||
if (!mapping.tempVar.HasValidID()) {
|
||||
continue;
|
||||
}
|
||||
for (const auto &var : _tempVariables) {
|
||||
if (var.ID() == mapping.tempVar._id) {
|
||||
if (var.ID() == mapping.tempVar.GetID()) {
|
||||
mapping.tempVar = var.GetRef();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
NotifyUIAboutTempVarChange(this);
|
||||
}
|
||||
|
||||
std::vector<TempVariable> MacroSegment::GetOwnTempVars() const
|
||||
|
||||
Reference in New Issue
Block a user