Mark Program node as undefined

I am using checkboxes, but when a checkbox is marked, the isDefined method in the contribution is not called again.

Is it somehow possible to tell Polyscope that the program node is now undefined?
Or can I somehow trigger Polyscope to call isDefined() again?

I think you can just do this:

	public boolean isDefined() {
		return model.get(DEFINED, false);

Then just write to that datamodel key when setting your checkbox. set it false when unchecked, and set it true when checked.

My problem is that my isDefined function is not called when I mark the checkbox.
If my isDefined function is called, it would work.

It’s overridden and called when changes are made to the datamodel.

From the Documentation:

So as long as you’re writing to the datamodel when you click/unclick your box (which you should be doing) you will be calling isDefined()

1 Like