Merge branch '3.0' of github.com:Ultimaker/cura into 3.0

This commit is contained in:
A.Sasin 2017-10-09 14:24:43 +02:00
commit 14936f7999
3 changed files with 28 additions and 6 deletions

View file

@ -527,12 +527,12 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
self._last_request_time = time()
def _finalizePostReply(self):
if self._post_reply is None:
return
# Indicate uploading was finished (so another file can be send)
self._write_finished = True
if self._post_reply is None:
return
try:
try:
self._post_reply.uploadProgress.disconnect(self._onUploadProgress)

View file

@ -127,7 +127,12 @@ class VersionUpgrade25to26(VersionUpgrade):
machine_id = parser["general"]["id"]
quality_container_id = parser["containers"]["2"]
material_container_id = parser["containers"]["3"]
definition_container_id = parser["containers"]["6"]
# we don't have definition_changes container in 2.5
if "6" in parser["containers"]:
definition_container_id = parser["containers"]["6"]
else:
definition_container_id = parser["containers"]["5"]
if definition_container_id == "custom" and not self._checkCustomFdmPrinterHasExtruderStack(machine_id):
# go through all extruders and make sure that this custom FDM printer has 8 extruder stacks.

View file

@ -117,8 +117,25 @@ class VersionUpgrade27to30(VersionUpgrade):
# Set the definition to "ultimaker2" for Ultimaker 2 quality changes
if not parser.has_section("general"):
parser.add_section("general")
if os.path.basename(filename).startswith("ultimaker2_"):
parser["general"]["definition"] = "ultimaker2"
# Need to exclude the following names:
# - ultimaker2_plus
# - ultimaker2_go
# - ultimaker2_extended
# - ultimaker2_extended_plus
exclude_prefix_list = ["ultimaker2_plus_",
"ultimaker2_go_",
"ultimaker2_extended_",
"ultimaker2_extended_plus_"]
file_base_name = os.path.basename(filename)
if file_base_name.startswith("ultimaker2_"):
skip_this = False
for exclude_prefix in exclude_prefix_list:
if file_base_name.startswith(exclude_prefix):
skip_this = True
break
if not skip_this:
parser["general"]["definition"] = "ultimaker2"
# Update version numbers
parser["general"]["version"] = "2"