From 935596d6036b700dbcea99f46746a75dfa39c140 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 1 Mar 2016 11:23:20 +0100 Subject: [PATCH 1/5] Add log entry when opening a file via Qt event This helps debugging CURA-730, and might also help debugging similar issues in the future. It's a user-triggered event so this warrants an info-level log entry. Contributes to issue CURA-730. --- cura/CuraApplication.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 6e4527feec..2e6f2f59a1 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -207,6 +207,7 @@ class CuraApplication(QtApplication): # Handle Qt events def event(self, event): if event.type() == QEvent.FileOpen: + Logger.log("i", "File open via Qt event: %s", event.file()) self._openFile(event.file()) return super().event(event) From e3a12919f0f63d42edb7f83590da454ea4d6bb4b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 1 Mar 2016 11:34:36 +0100 Subject: [PATCH 2/5] Slightly increased size of head for um2+ Discussed this with HW department, size of um2+ head is slightly bigger. CURA-900 --- resources/machines/ultimaker2plus.json | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/resources/machines/ultimaker2plus.json b/resources/machines/ultimaker2plus.json index f11cbe46d7..7e158b8a84 100644 --- a/resources/machines/ultimaker2plus.json +++ b/resources/machines/ultimaker2plus.json @@ -15,6 +15,27 @@ "machine_depth": { "default": 225 }, "machine_height": { "default": 200 }, "machine_show_variants": { "default": true }, - "gantry_height": { "default": 50 } + "gantry_height": { "default": 50 }, + "machine_head_with_fans_polygon": + { + "default": [ + [ + -44, + 14 + ], + [ + -44, + -34 + ], + [ + 64, + 14 + ], + [ + 64, + -34 + ] + ] + } } } From 7b9ecd4aba22443bb843c83126df0b38baa206a0 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 1 Mar 2016 12:16:55 +0100 Subject: [PATCH 3/5] Revert "Make conical support invisible by default" This reverts commit d54b24ac86439fe9ae9d9915e70848e66dec99fb. --- resources/machines/fdmprinter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 20ec26f223..ca21e83a97 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -1305,7 +1305,7 @@ "description": "Experimental feature: Make support areas smaller at the bottom than at the overhang.", "type": "boolean", "default": false, - "visible": false, + "visible": true, "enabled": "support_enable" }, "support_conical_angle": { From 232713a0193b7f485340af440f56794ae2b222a2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 1 Mar 2016 13:16:57 +0100 Subject: [PATCH 4/5] Catch file open events before file loaders are loaded The event is essentially delayed. The filename is put in a list by the event handler. The list of files is then loaded after all plug-ins are loaded. Contributes to issue CURA-730. --- cura/CuraApplication.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f70c7fba6a..f0c7008b46 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -78,8 +78,13 @@ class CuraApplication(QtApplication): if not hasattr(sys, "frozen"): Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..")) + self._open_file_queue = [] #Files to open when plug-ins are loaded. + super().__init__(name = "cura", version = CuraVersion) + for file_name in self._open_file_queue: #Open all the files that were queued up while plug-ins were loading. + self._openFile(file_name) + self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png"))) self.setRequiredPlugins([ @@ -148,6 +153,8 @@ class CuraApplication(QtApplication): if self.getBackend() == None: raise RuntimeError("Could not load the backend plugin!") + self._plugins_loaded = True + def addCommandLineOptions(self, parser): super().addCommandLineOptions(parser) parser.add_argument("file", nargs="*", help="Files to load after starting the application.") @@ -211,8 +218,10 @@ class CuraApplication(QtApplication): # Handle Qt events def event(self, event): if event.type() == QEvent.FileOpen: - Logger.log("i", "File open via Qt event: %s", event.file()) - self._openFile(event.file()) + if self._plugins_loaded: + self._openFile(event.file()) + else: + self._open_file_queue.append(event.file()) return super().event(event) From d27d4df8ff711a573955182a4fa2decf067ba2a2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 1 Mar 2016 13:35:46 +0100 Subject: [PATCH 5/5] Move file open queue handling later At the point where the file open queue was processed, the events weren't handled yet. Here's to hoping that they will be handled at this point (but I must commit before testing...). Contributes to issue CURA-730. --- cura/CuraApplication.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index f0c7008b46..1b41cdda2f 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -82,9 +82,6 @@ class CuraApplication(QtApplication): super().__init__(name = "cura", version = CuraVersion) - for file_name in self._open_file_queue: #Open all the files that were queued up while plug-ins were loading. - self._openFile(file_name) - self.setWindowIcon(QIcon(Resources.getPath(Resources.Images, "cura-icon.png"))) self.setRequiredPlugins([ @@ -212,6 +209,8 @@ class CuraApplication(QtApplication): for file in self.getCommandLineOption("file", []): self._openFile(file) + for file_name in self._open_file_queue: #Open all the files that were queued up while plug-ins were loading. + self._openFile(file_name) self.exec_()