142 |
self.shapetable = Table(filename) |
self.shapetable = Table(filename) |
143 |
self.table = self.shapetable |
self.table = self.shapetable |
144 |
|
|
145 |
self.__classification = classification.Classification(self) |
# |
146 |
|
# this is really important so that when the classification class |
147 |
|
# tries to set its parent layer the variable will exist |
148 |
|
# |
149 |
|
self.__classification = None |
150 |
|
|
151 |
|
self.SetClassification(classification.Classification(self)) |
152 |
self.__classification.SetDefaultLineColor(stroke) |
self.__classification.SetDefaultLineColor(stroke) |
153 |
self.__classification.SetDefaultLineWidth(lineWidth) |
self.__classification.SetDefaultLineWidth(lineWidth) |
154 |
self.__classification.SetDefaultFill(fill) |
self.__classification.SetDefaultFill(fill) |
268 |
return self.__classification |
return self.__classification |
269 |
|
|
270 |
def SetClassification(self, clazz): |
def SetClassification(self, clazz): |
271 |
|
|
272 |
|
# prevent infinite recursion when calling SetLayer() |
273 |
|
if clazz == self.__classification: |
274 |
|
return |
275 |
|
|
276 |
self.__classification = clazz |
self.__classification = clazz |
277 |
|
self.__classification.SetLayer(self) |
278 |
self.changed(LAYER_LEGEND_CHANGED, self) |
self.changed(LAYER_LEGEND_CHANGED, self) |
279 |
|
|
280 |
def TreeInfo(self): |
def TreeInfo(self): |