Resetting ModuleWidget properties on Reset

I’m in the process of porting from v0.6 to v1

in v0.6 there was a virtual reset method which was called when the context menu reset was selected.
in v1 this is no longer present. There is a non-virtual resetAction method.

If I want to reset some properties of a ui widget when the user resets the module, can I still achieve that, or will I need to add my own context menu item for resetting UI?

It is no longer present, and I could add it, but I don’t want to recommend the practice of overriding it. ModuleWidgets are like Views while Modules are like Models in the Model-View paradigm. What do you need to do in the reset event?

This is a notes display, and reset currently resets the color of the text.

Don’t change anything. I’ll add a reset param to the module. And the widget can check if the module exists, and reset the display if the flag is set.

Thank you

Yes, I would recommend using your Module as a “database” for the corresponding ModuleWidget.