Looking at the old code shows that the download process was never
completely finished. The according function was only return'ed, but no
signal was emitted to the window to give the user the possibility to
close it again.
Optionally, it would be useful here to pass messages to the window
dialog to inform the user about problems.
However, this code is untested because:
1. I don't know where put my printers *.hex-file, when coding here with
my editor,
2. Have no idea how to reproduce the IO errors reported at JIRA, so
fingers crossed here.
Contributes to CURA-2079
Currently it sets the user profile to 'empty', which is bad because empty is read-only. But it allows me to continue for now. I'll find a solution for that later.
Contributes to issue CURA-844.
Turns out that copy.copy() doesn't work on ConfigParsers. It returns a different instance but modifying that instance still modifies the old configs. Deep copy isn't allowed. But this dictionary copy works.
Contributes to issue CURA-844.
If the old profile didn't specify any material, it would be global. But if the new machine specifies that its profiles are material-specific, these profiles have to be split into multiple profiles in order to be able to show them in Cura 2.2.
Contributes to issue CURA-844.
This way the user can add a setting that is not made visible in the sidebar. Adding a specific setting no longer needs a detour through the setting visibility preference page.
CURA-1799
As discussed on GitHub we don't need a complete traceback on HTTPError.
However URLError should return a full traceback, like any other
exception that might occur.
The value property was sometimes not set. In the default case, this just added an empty setting instance (for a particular key), which appeared to do nothing until you've changed it. This appears correct because if it's not changed then it should be the same as the extruder's value, but if you then change the extruder's value it doesn't update its visible value but still has no value in the setting instance, so the value still falls back to the extruder and the setting ends up different from what is being displayed.
Contributes to issue CURA-1988.
Setting .value creates a new Python attribute in the object. Setting with setProperty creates the setting property, like we wanted.
Contributes to issue CURA-2011.