mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 21:09:00 +08:00
Added check to see if requested layer is in the list.
contributes to #193
This commit is contained in:
parent
752a4b26fa
commit
a85347134e
@ -28,7 +28,8 @@ class LayerData(MeshData):
|
|||||||
self._layers[layer].polygons.append(p)
|
self._layers[layer].polygons.append(p)
|
||||||
|
|
||||||
def getLayer(self, layer):
|
def getLayer(self, layer):
|
||||||
return self._layers[layer]
|
if layer in self._layers:
|
||||||
|
return self._layers[layer]
|
||||||
|
|
||||||
def getLayers(self):
|
def getLayers(self):
|
||||||
return self._layers
|
return self._layers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user