mat-savage / PythonEditCounter

1 stars 0 forks source link

If onChangeFeature is fired first, self.currentLayer is null #3

Closed mat-savage closed 8 years ago

mat-savage commented 8 years ago

Traceback (most recent call last): File "C:\Users\msavage\AppData\Local\ESRI\Desktop10.3\AssemblyCache{E88A0B6F-3974-4598-BF94-6C46105CAF55}\PythonEditCounter_addin.py", line 42, in onChangeFeature if lyr.symbologyType == 'UNIQUE_VALUES': AttributeError: 'NoneType' object has no attribute 'symbologyType'

mat-savage commented 8 years ago

Fixed with GetCurrentLayer() function if currentLayer is None.