Adds layer count

Brings back the layer count, the min & max. And it does not display these untill Cura is done slicing.

Fixes #117
This commit is contained in:
Tamara Hogenhout 2015-07-08 18:01:03 +02:00
parent ef86eb480f
commit 53a94c23e1
5 changed files with 90 additions and 5 deletions

View file

@ -11,7 +11,13 @@ class LayerViewProxy(QObject):
currentLayerChanged = pyqtSignal()
maxLayersChanged = pyqtSignal()
activityChanged = pyqtSignal()
@pyqtProperty(bool, notify = activityChanged)
def getLayerActivity(self):
active_view = self._controller.getActiveView()
return active_view.getActivity()
@pyqtProperty(int, notify = maxLayersChanged)
def numLayers(self):
active_view = self._controller.getActiveView()
@ -30,9 +36,13 @@ class LayerViewProxy(QObject):
active_view = self._controller.getActiveView()
if type(active_view) == LayerView.LayerView.LayerView:
active_view.setLayer(layer_num)
def _layerActivityChanged(self):
self.activityChanged.emit()
def _onLayerChanged(self):
self.currentLayerChanged.emit()
self._layerActivityChanged()
def _onMaxLayersChanged(self):
self.maxLayersChanged.emit()