/[thuban]/trunk/thuban/Thuban/Model/layer.py
ViewVC logotype

Diff of /trunk/thuban/Thuban/Model/layer.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 480 by jonathan, Wed Mar 5 18:17:47 2003 UTC revision 481 by jonathan, Thu Mar 6 16:46:36 2003 UTC
# Line 142  class Layer(BaseLayer): Line 142  class Layer(BaseLayer):
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)
# Line 262  class Layer(BaseLayer): Line 268  class Layer(BaseLayer):
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):

Legend:
Removed from v.480  
changed lines
  Added in v.481

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26