From 41083692f13a8ebf288131180a498f76b13b8ce5 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 4 May 2015 16:18:03 -0400 Subject: [PATCH] Do not reuse an argument variable as iterator This caused issues with the head/gantry size when printing one object at a time. The obj variable would never be None at the end of the function which means it wasn't updating all objects with the gantry size, only the last object iterated on, which caused the objects to think there are no collisions between them when printing order was being decided. This should hopefully fix issue #104 --- Cura/util/objectScene.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cura/util/objectScene.py b/Cura/util/objectScene.py index 18850a62..d29ded10 100644 --- a/Cura/util/objectScene.py +++ b/Cura/util/objectScene.py @@ -173,8 +173,8 @@ class Scene(object): #print mode was changed by user. We need to reset that value to test with current scene content self._lastResultOneAtATime = True - for obj in self._objectList: - if obj.getSize()[2] - objectSink > self._gantryHeight: + for objIter in self._objectList: + if objIter.getSize()[2] - objectSink > self._gantryHeight: self._oneAtATime = False if self._lastResultOneAtATime: if self._sceneView: -- 2.30.2