From: Youness Alaoui Date: Mon, 4 May 2015 20:18:03 +0000 (-0400) Subject: Do not reuse an argument variable as iterator X-Git-Tag: lulzbot-15.02.1-1.01~30 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=41083692f13a8ebf288131180a498f76b13b8ce5;p=cura.git 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 --- 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: