mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 18:49:01 +08:00
Added more checks to LayerViewProxy
Contributes to asana issue 49817948603866
This commit is contained in:
parent
1b7bb76939
commit
d72ec68d8c
@ -16,13 +16,14 @@ class LayerViewProxy(QObject):
|
||||
@pyqtProperty(bool, notify = activityChanged)
|
||||
def getLayerActivity(self):
|
||||
active_view = self._controller.getActiveView()
|
||||
return active_view.getActivity()
|
||||
if type(active_view) == LayerView.LayerView.LayerView:
|
||||
return active_view.getActivity()
|
||||
|
||||
@pyqtProperty(int, notify = maxLayersChanged)
|
||||
def numLayers(self):
|
||||
active_view = self._controller.getActiveView()
|
||||
#print("num max layers " , active_view.getMaxLayers())
|
||||
return active_view.getMaxLayers()
|
||||
if type(active_view) == LayerView.LayerView.LayerView:
|
||||
return active_view.getMaxLayers()
|
||||
#return 100
|
||||
|
||||
@pyqtProperty(int, notify = currentLayerChanged)
|
||||
|
Loading…
x
Reference in New Issue
Block a user