From 41d03536eb2c175ce3dbdda522d338e73964c926 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sat, 11 Jun 2016 13:16:40 +0200 Subject: [PATCH 1/3] Using a save name for variable "property" Using "property" here might be not save. Just replaced that variable with "attribute" and added a reminder, so nobody renames it to "property" again. --- cura/SettingOverrideDecorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/SettingOverrideDecorator.py b/cura/SettingOverrideDecorator.py index e3e3555016..7615dbe873 100644 --- a/cura/SettingOverrideDecorator.py +++ b/cura/SettingOverrideDecorator.py @@ -51,8 +51,8 @@ class SettingOverrideDecorator(SceneNodeDecorator): def getActiveExtruder(self): return self._extruder_stack - def _onSettingChanged(self, instance, property): - if property == "value": # Only reslice if the value has changed. + def _onSettingChanged(self, instance, attribute): # Reminder: 'property' is a built-in function + if attribute == "value": # Only reslice if the value has changed. Application.getInstance().getBackend().forceSlice() ## Makes sure that the stack upon which the container stack is placed is From c38e31f0e35dd3a28c58b45b3c36af7f3ecd6941 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sat, 11 Jun 2016 13:21:52 +0200 Subject: [PATCH 2/3] BuildVolume: Remove worthless line Just a small clean up. skirt_size was initialized twice. --- cura/BuildVolume.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 61802167a7..f071bf4057 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -199,7 +199,6 @@ class BuildVolume(SceneNode): disallowed_areas = self._active_container_stack.getProperty("machine_disallowed_areas", "value") areas = [] - skirt_size = 0.0 skirt_size = self._getSkirtSize(self._active_container_stack) if disallowed_areas: From bf1cb8ae5207d6f916bf5ea4ede809e0c990a004 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Sun, 12 Jun 2016 15:49:13 +0200 Subject: [PATCH 3/3] Rename 'attribute' to 'property_name' --- cura/SettingOverrideDecorator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/SettingOverrideDecorator.py b/cura/SettingOverrideDecorator.py index 7615dbe873..24360ed992 100644 --- a/cura/SettingOverrideDecorator.py +++ b/cura/SettingOverrideDecorator.py @@ -51,8 +51,8 @@ class SettingOverrideDecorator(SceneNodeDecorator): def getActiveExtruder(self): return self._extruder_stack - def _onSettingChanged(self, instance, attribute): # Reminder: 'property' is a built-in function - if attribute == "value": # Only reslice if the value has changed. + def _onSettingChanged(self, instance, property_name): # Reminder: 'property' is a built-in function + if property_name == "value": # Only reslice if the value has changed. Application.getInstance().getBackend().forceSlice() ## Makes sure that the stack upon which the container stack is placed is @@ -78,4 +78,4 @@ class SettingOverrideDecorator(SceneNodeDecorator): self.activeExtruderChanged.emit() def getStack(self): - return self._stack \ No newline at end of file + return self._stack