Merge branch 'master' into CS-234_network_plugin_code_quality

This commit is contained in:
ChrisTerBeke 2019-07-29 08:47:13 +02:00
commit 8f37c83b9c
58 changed files with 403 additions and 168 deletions

View file

@ -134,6 +134,14 @@ class StartSliceJob(Job):
self.setResult(StartJobResult.BuildPlateError)
return
# Wait for error checker to be done.
while CuraApplication.getInstance().getMachineErrorChecker().needToWaitForResult:
time.sleep(0.1)
if CuraApplication.getInstance().getMachineErrorChecker().hasError:
self.setResult(StartJobResult.SettingError)
return
# Don't slice if the buildplate or the nozzle type is incompatible with the materials
if not CuraApplication.getInstance().getMachineManager().variantBuildplateCompatible and \
not CuraApplication.getInstance().getMachineManager().variantBuildplateUsable:

View file

@ -14,6 +14,9 @@ _renamed_profiles = {"generic_pla_0.4_coarse": "jbo_generic_pla_0.4_coarse",
"generic_petg_0.4_medium": "jbo_generic_petg_medium",
}
_removed_settings = {
"start_layers_at_same_position"
}
## Upgrades configurations from the state they were in at version 4.2 to the
# state they should be in at version 4.3.
@ -41,19 +44,24 @@ class VersionUpgrade42to43(VersionUpgrade):
#
# This renames the renamed settings in the containers.
def upgradeInstanceContainer(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
parser = configparser.ConfigParser(interpolation=None)
parser = configparser.ConfigParser(interpolation = None)
parser.read_string(serialized)
# Update version number.
parser["metadata"]["setting_version"] = "9"
if "values" in parser:
for key in _removed_settings:
if key in parser["values"]:
del parser["values"][key]
result = io.StringIO()
parser.write(result)
return [filename], [result.getvalue()]
## Upgrades stacks to have the new version number.
def upgradeStack(self, serialized: str, filename: str) -> Tuple[List[str], List[str]]:
parser = configparser.ConfigParser(interpolation=None)
parser = configparser.ConfigParser(interpolation = None)
parser.read_string(serialized)
# Update version number.