/[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 1086 by jan, Wed May 28 11:36:05 2003 UTC revision 1088 by bh, Wed May 28 12:42:23 2003 UTC
# Line 199  class Layer(BaseLayer): Line 199  class Layer(BaseLayer):
199    
200          self.shapetree = shptree.SHPTree(self.shapefile.cobject(), 2,          self.shapetree = shptree.SHPTree(self.shapefile.cobject(), 2,
201                                           maxdepth)                                           maxdepth)
202            # Set the classification to None if there is a classification
203            # and the new shapestore doesn't have a table with a suitable
204            # column, i.e one with the same name and type as before
205            # FIXME: Maybe we should keep it the same if the type is
206            # compatible enough such as FIELDTYPE_DOUBLE and FIELDTYPE_INT
207          if self.__classification is not None:          if self.__classification is not None:
208              fieldname = self.__classification.GetField()              fieldname = self.__classification.GetField()
209              if fieldname is not None and \              fieldtype = self.__classification.GetFieldType()
210                 not self.store.Table().HasColumn(fieldname):              table = self.store.Table()
211                if (fieldname is not None
212                    and (not table.HasColumn(fieldname)
213                         or table.Column(fieldname).type != fieldtype)):
214                  self.SetClassification(None)                  self.SetClassification(None)
215          self.changed(LAYER_CHANGED, self)          self.changed(LAYER_CHANGED, self)
216    

Legend:
Removed from v.1086  
changed lines
  Added in v.1088

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26