Made message for layerview interdimate

Fixes Ultimaker/Cura#303
This commit is contained in:
Jaime van Kessel 2015-09-17 16:54:36 +02:00
parent 1c23549e6d
commit b55c4d8e46

View File

@ -27,7 +27,7 @@ class ProcessSlicedObjectListJob(Job):
def run(self):
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0)
self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, -1)
self._progress.show()
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
@ -52,9 +52,6 @@ class ProcessSlicedObjectListJob(Job):
else:
center = numpy.array([0.0, 0.0, 0.0])
if self._progress:
self._progress.setProgress(2)
mesh = MeshData()
layer_data = LayerData.LayerData()
for object in self._message.objects:
@ -80,14 +77,10 @@ class ProcessSlicedObjectListJob(Job):
layer_data.addPolygon(layer.id, polygon.type, points, polygon.line_width)
if self._progress:
self._progress.setProgress(50)
# We are done processing all the layers we got from the engine, now create a mesh out of the data
layer_data.build()
if self._progress:
self._progress.setProgress(100)
#Add layerdata decorator to scene node to indicate that the node has layerdata
decorator = LayerDataDecorator.LayerDataDecorator()