From 4d4192d6d680633263c0cea4b4ed5f0aa3f156e1 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 27 Aug 2015 09:35:05 +0200 Subject: [PATCH] Ignore some active machine changes since we need to port code --- cura/CuraApplication.py | 32 +++++++++++++++++--------------- cura/PrintInformation.py | 1 + 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index effa287eda..a0d29e86cb 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -461,26 +461,28 @@ class CuraApplication(QtApplication): def _onActiveMachineChanged(self): machine = self.getMachineManager().getActiveMachineInstance() if machine: + pass + #Preferences.getInstance().setValue("cura/active_machine", machine.getName()) - self._volume.setWidth(machine.getSettingValueByKey("machine_width")) - self._volume.setHeight(machine.getSettingValueByKey("machine_height")) - self._volume.setDepth(machine.getSettingValueByKey("machine_depth")) + #self._volume.setWidth(machine.getSettingValueByKey("machine_width")) + #self._volume.setHeight(machine.getSettingValueByKey("machine_height")) + #self._volume.setDepth(machine.getSettingValueByKey("machine_depth")) - disallowed_areas = machine.getSettingValueByKey("machine_disallowed_areas") - areas = [] - if disallowed_areas: - for area in disallowed_areas: - areas.append(Polygon(numpy.array(area, numpy.float32))) + #disallowed_areas = machine.getSettingValueByKey("machine_disallowed_areas") + #areas = [] + #if disallowed_areas: + #for area in disallowed_areas: + #areas.append(Polygon(numpy.array(area, numpy.float32))) - self._volume.setDisallowedAreas(areas) + #self._volume.setDisallowedAreas(areas) - self._volume.rebuild() + #self._volume.rebuild() - offset = machine.getSettingValueByKey("machine_platform_offset") - if offset: - self._platform.setPosition(Vector(offset[0], offset[1], offset[2])) - else: - self._platform.setPosition(Vector(0.0, 0.0, 0.0)) + #offset = machine.getSettingValueByKey("machine_platform_offset") + #if offset: + #self._platform.setPosition(Vector(offset[0], offset[1], offset[2])) + #else: + #self._platform.setPosition(Vector(0.0, 0.0, 0.0)) def _onFileLoaded(self, job): node = job.getResult() diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index f4a574c0b9..9697e65294 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -176,6 +176,7 @@ class PrintInformation(QObject): self._slice_reason = None def _onActiveMachineChanged(self): + return if self._current_settings: self._current_settings.settingChanged.disconnect(self._onSettingChanged)