I'm running into some issues with my customizations of the Graph Editor example in which I want to lay down an initial set of modules but allow the user to add additional ones.
The user can create a subgraph of nodes with a single right-click action.
But when a new document is created an initial subgraph of nodes needs to be laid down automatically.
I need to keep uniqueness in the module id's but what I'm finding is that my initial set of modules are not acknowledged in the validation classes.
I am adding my initial nodes via a DocumentRegistry_ActiveDocumentChanged callback inside my Editor subclass.
I create a hierarchy of nodes, finally usingCircuitEditingContext.Insert on the parent.
I've tried wrapping this whole "startup" process in a Transaction but nothing I do gets them into the validator list (specifically m_names of UniqueNamer).
Thus, when the user creates a new set of nodes, the first set is named exactly like this 'starter' set (no validation - modules have duplicate names/ids).
However, all node sets created after are fine since the user-activated node creation IS validated.
I've been trying to figure out what I'm missing for hours now but I'm clearly not understanding what I need to understand.
But so far it hasn't helped.
If anyone can shed more light on why my attempts might be failing, I'd be in your debt.
-Len