**The diagnosis:**
The issue arrises from the fact that while the original object is subscribed to be validated, that subscription is only created by setting it as a settings override object. A clone of that object, while still a settings-override object, never gets subscribed because it's not explicitly set with the tool.
**The solution (?):**
I moved all the validation stuff over to SettingOverrideDecorator.py, and use its onSettingChanged() function to trigger the validation. Unfortunately, I can't use the timer because of some limitation with QTTimer and threads. So it's _a bit laggy in some places, and I'd be open to tips about how to fix this. It does work reliably though.
The issue Andreea found was caused by the fact that the object was unsubscribed from setting validation while still having the illegal value, because the setting (and its illegal value) was removed AFTER unsubscribing. Thus the illegal value got "saved" until the next time you added that setting and set the correct value.
It has no semantic meaning to specify that here. The behaviour of this commit should be the same since 'None' is the default value for that parameter.
Contributes to issue CURA-4966.
quality definition if the printer has_machine_quality. Otherwise the
fdmprinter definition must be used as a fallback. If there is no
quality_definition then the printer definition is use.
parsing, the quality definition is taken into account instead of the
definition.
The message when importing a profile to a different machine,
now shows the expected machine and the current machine definition id.!!
This is the ~5 minute~ 3 second fix. I know it's not the more proper way to do it, but I've spent several hours on the more proper way to do it and it's causing huge amounts of headache (because, for example, the PluginBrowser installs plugins and the PluginRegistry removes them, and the PluginBrowser can't update the PluginsModel because the PluginsModel is intantiated in QML instead of in `PluginBrowser.py`, etc. etc. etc.
I'm effectively doing a full refactor of this functionality while simultaneously avoiding moving any "install from remote URL" functionality into the PluginRegistry which is dumb.
I'd prefer a simple, stable soution now instead of re-writing this all again.
I'll make a proposal for a proper, organized refactor for Cookies & Cura.
It has to iterate over all layers and do string comparison to find the index back. Instead we just keep track of the index so this should improve performance a bit.