/[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 996 by bh, Thu May 22 18:21:10 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    
# Line 350  class Layer(BaseLayer): Line 358  class Layer(BaseLayer):
358      def TreeInfo(self):      def TreeInfo(self):
359          items = []          items = []
360    
361            if hasattr(self, 'filename'):
362                items.append(_("Filename: %s") % self.filename)
363    
364          if self.Visible():          if self.Visible():
365              items.append(_("Shown"))              items.append(_("Shown"))
366          else:          else:

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26