mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
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:
parent
ef86eb480f
commit
53a94c23e1
5 changed files with 90 additions and 5 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue