Closed MaksymKapelianovych closed 5 months ago
This issue was reproduced with nodes PlayLevelSequence, CallOwnerFunction, SubGraph (when adding custom input/output), basically every node, that call OnReconstructionRequested.ExecuteIfBound() from its PostEditChangeProperty(). With my fix everything is working properly.
Thank you, it works beautifully! :)
The reason of that issue was, that during transactions, resetting pin arrays was not stored as part of the transaction, and after undo/redo action these arrays were empty and pins connections could not be properly restored or removed.
To fix this we simply need to call Modify() before changing pins arrays. I decided to add this into the OnExternalChange() function and not into the ReconstructNode() itself, because in other places, where ReconstructNode() is called, transactions (and Modify() function call) exist in calling functions. I did not add transaction object itself, because if the OnExternalChange() is called from property modification event, it is already inside transaction, and if it is called from BP compilation, then this transaction would be stored as a separate transaction, and undoing it would not bring much use (to undo actual changes, user needs to press Ctrl+Z again).