From c329c2e12d4d419fce4386d5e8da5c188d84204b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 19 Apr 2016 16:52:22 +0200 Subject: [PATCH 1/3] Do not try to recreate the socket when we are shutting down anyway This prevents issues where closing the socket triggers socket creation and then a deadlock occurs. Contributes to CURA-1391 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 59a802045a..7a5d332d9e 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -200,8 +200,10 @@ class CuraEngineBackend(Backend): self._onChanged() def _onSocketError(self, error): - super()._onSocketError(error) + if Application.getInstance().isShuttingDown(): + return + super()._onSocketError(error) self._terminate() if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]: From e7e4512fd094963c5dd8048de6d3289909c294be Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 19 Apr 2016 17:39:30 +0200 Subject: [PATCH 2/3] JSON: fix: moved line distance computation from engine to frontend (CURA-1317) --- resources/machines/fdmprinter.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index dc851770cf..1db6182601 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -552,7 +552,7 @@ "default": 2, "min_value": "0", "visible": false, - "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density" + "inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density * (2 if infill_pattern == \"grid\" else (3 if infill_pattern == \"triangles\" else 1))" } } }, @@ -1237,7 +1237,7 @@ "default": 2.66, "visible": false, "enabled": "support_enable", - "inherit_function": "(support_line_width * 100) / parent_value", + "inherit_function": "(support_line_width * 100) / parent_value * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))", "global_only": true } } @@ -1372,7 +1372,7 @@ "default": 0.4, "min_value": "0", "visible": false, - "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value", + "inherit_function": "0 if parent_value == 0 else (support_roof_line_width * 100) / parent_value * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))", "enabled": "support_roof_enable", "global_only": true } From c2ac0e8217b997528cf72a916ccd348f92ed94c6 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 19 Apr 2016 18:11:11 +0200 Subject: [PATCH 3/3] Fix resource paths after Uranium API change Contributes to CURA-1390 --- cura/CuraApplication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 8579ce7e09..c83da0c071 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -66,9 +66,9 @@ class CuraApplication(QtApplication): Q_ENUMS(ResourceTypes) def __init__(self): - Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura")) + Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura", "resources")) if not hasattr(sys, "frozen"): - Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) + Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")) self._open_file_queue = [] # Files to open when plug-ins are loaded.