alelievr/NodeGraphProcessor

Undo bug

Opened this issue · 0 comments

GroupView - both graph instance and group view instance hold reference to the same Group class. When reloading (undo/redo), RemoveGroups() removes all elements in the group, which triggers view's OnElementsRemoved(), which removes all the elements from the Group instance - essentially clearing it from the graph as well.

My solution was pretty hacky - set reloading = true and then check if (owner.reloading) return; on GroupView.OnElementsRemoved. There might be a better approach, idk.