D6: Fixed file naming, removed spaces and fixed decoration calls

This commit is contained in:
Victor Larchenko 2016-12-19 10:10:51 +06:00 committed by Youness Alaoui
parent 9e85d6c894
commit 485e81731f
4 changed files with 12 additions and 12 deletions

View file

@ -585,9 +585,12 @@ class CuraApplication(QtApplication):
def updatePlatformActivity(self, node = None):
count = 0
scene_bounding_box = None
is_block_slicing_node = False
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
if type(node) is not SceneNode or (not node.getMeshData() and not node.callDecoration("isBlockSlicing")):
if type(node) is not SceneNode or (not node.getMeshData() and not node.callDecoration("getLayerData")):
continue
if node.callDecoration("isBlockSlicing"):
is_block_slicing_node = True
count += 1
if not scene_bounding_box:
@ -597,6 +600,10 @@ class CuraApplication(QtApplication):
if other_bb is not None:
scene_bounding_box = scene_bounding_box + node.getBoundingBox()
print_information = self.getPrintInformation()
if print_information:
print_information.setPreSliced(is_block_slicing_node)
if not scene_bounding_box:
scene_bounding_box = AxisAlignedBox.Null
@ -717,7 +724,7 @@ class CuraApplication(QtApplication):
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
if type(node) is not SceneNode:
continue
if (not node.getMeshData() and not node.callDecoration("isBlockSlicing")) and not node.callDecoration("isGroup"):
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
continue # Node that doesnt have a mesh and is not a group.
if node.getParent() and node.getParent().callDecoration("isGroup"):
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)

View file

@ -315,8 +315,6 @@ class CuraEngineBackend(Backend):
if source is self._scene.getRoot():
return
application = Application.getInstance()
should_pause = False
for node in DepthFirstIterator(self._scene.getRoot()):
if node.callDecoration("isBlockSlicing"):
@ -325,15 +323,10 @@ class CuraEngineBackend(Backend):
if gcode_list is not None:
self._scene.gcode_list = gcode_list
print_information = application.getPrintInformation()
if should_pause:
self.pauseSlicing()
if print_information:
print_information.setPreSliced(True)
else:
self.continueSlicing()
if print_information:
print_information.setPreSliced(False)
if source.getMeshData() is None:
return