mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Added more checks to LayerViewProxy
Contributes to asana issue 49817948603866
This commit is contained in:
parent
1b7bb76939
commit
d72ec68d8c
1 changed files with 4 additions and 3 deletions
|
@ -16,13 +16,14 @@ class LayerViewProxy(QObject):
|
||||||
@pyqtProperty(bool, notify = activityChanged)
|
@pyqtProperty(bool, notify = activityChanged)
|
||||||
def getLayerActivity(self):
|
def getLayerActivity(self):
|
||||||
active_view = self._controller.getActiveView()
|
active_view = self._controller.getActiveView()
|
||||||
return active_view.getActivity()
|
if type(active_view) == LayerView.LayerView.LayerView:
|
||||||
|
return active_view.getActivity()
|
||||||
|
|
||||||
@pyqtProperty(int, notify = maxLayersChanged)
|
@pyqtProperty(int, notify = maxLayersChanged)
|
||||||
def numLayers(self):
|
def numLayers(self):
|
||||||
active_view = self._controller.getActiveView()
|
active_view = self._controller.getActiveView()
|
||||||
#print("num max layers " , active_view.getMaxLayers())
|
if type(active_view) == LayerView.LayerView.LayerView:
|
||||||
return active_view.getMaxLayers()
|
return active_view.getMaxLayers()
|
||||||
#return 100
|
#return 100
|
||||||
|
|
||||||
@pyqtProperty(int, notify = currentLayerChanged)
|
@pyqtProperty(int, notify = currentLayerChanged)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue