Added more checks to LayerViewProxy

Contributes to asana issue 49817948603866
This commit is contained in:
Jaime van Kessel 2015-09-14 14:00:05 +02:00
parent 1b7bb76939
commit d72ec68d8c

View file

@ -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)