Nodes with Context Pins, loose ALL pins on CTRL+Z / can lead to crash
soraphis opened this issue · comments
Soraphis commented
Reproduction:
- Create "Play Level Sequence" Node
- Assign any "LevelSequence"
- press CTRL+Z
Result:
My guess is that there is no "OnReconstructionRequested.ExecuteIfBound()" call for Undo!?
To make it crash the editor:
Reproduction:
- Create "Play Level Sequence" Node
- Create Sequence Node
- Bind Level Sequence Outputs to Sequence Node input
- Assign any "LevelSequence"
- press CTRL+Z
- press CTRL+Y --> Crash
Krzysiek Justyński commented
Thanks for a precise repro :)
I kinda managed to fix the first problem, pins won't disappear if I would call pin reconstruction from PostEditUndo
. Sadly, it's not enough to fix a crash. More time is needed to dig into the scheme of transactions here.
This is what I have locally.
void UFlowNode::PostEditUndo()
{
UObject::PostEditUndo();
// rebuild context pins on Undo any of node properties
if (SupportsContextPins())
{
OnReconstructionRequested.ExecuteIfBound();
}
}
Krzysiek Justyński commented
Fixed by a pull request :)
#189