The problem: When infill mesh is set, wall_thickness and
top_bottom_thickness are added to the settings. Then these settings are
set to visible on the visibility_handler.
It appears however, that the visibility_handler considers all added
settings to be visible. It thus concludes that no UI update is necessary
because the settings are already added.
several instances need to be created.
- In the ThreeMFWorkspaceReader we need to create some temporal
instances of Preferences that makes it not singleton anymore.
- The current preferences are kept in the Application class and so all
the calls to the preferences are changed to get the preferences from
Application.
- The method getInstance in Preferences is kept as deprecated since some
external plugins.
**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 SettingOverrideDecorator is only applied if the node has a per-object setting. Now it also creates a decorator also if you've ever switched the extruder, which was needed because the decorator contains the information which extruder to print with.
Contributes to issue CURA-340.
Actually selecting an extruder has no effect because there are dragons in that area and I need better armour with bonus damage against bugs before I venture in there.
Contributes to issues CURA-340 and CURA-1278.
This is a magical fix that Nallath and I found for a problem that shouldn't exist in the first place and sometimes doesn't exist at all and in the same time is a superposition of existing and not existing and it's all very complicated and an extremely weird hack. Casting this object to itself properly makes it castable to QVariant.
Contributes to issue CURA-458.
I found this other place that was helping to display the message that warns that print sequcence is set per-object. Since the latter is no longer possible, this message shouldn't be displayed any more.
Contributes to issue CURA-458.