Implementing dirty state to save changes in properties panel

Hello,

I am currently working on a graph that has a properties panel which displays information about the selected element. This panel also allows me to make changes to the element’s properties.

However, I have noticed that when I hit save, the changes I made are not saved unless I move something in the graph. After some research, I found that setting the dirty state can help solve this issue.

the dirty flag isn’t changing when I insert modifications in the properties panel. the flag is only set when I move an element or add a new one in the graph.

Could you please explain how to implement the dirty state in my project?

Thank you.

image