/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/save.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/save.py

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

revision 2616 by jonathan, Fri May 6 14:17:29 2005 UTC revision 2659 by jan, Wed Jul 27 21:51:31 2005 UTC
# Line 1  Line 1 
1  # Copyright (c) 2001-2005 by Intevation GmbH  # Copyright (c) 2001-2005 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jan-Oliver Wagner <[email protected]> (2004)  # Jan-Oliver Wagner <[email protected]> (2004-2005)
4  # Bernhard Herzog <[email protected]> (2001-2004)  # Bernhard Herzog <[email protected]> (2001-2004)
5  # Jonathan Coles <[email protected]> (2003)  # Jonathan Coles <[email protected]> (2003)
6  # Frank Koormann <[email protected]> (2003)  # Frank Koormann <[email protected]> (2003)
# Line 291  class SessionSaver(XMLWriter): Line 291  class SessionSaver(XMLWriter):
291    
292          if isinstance(layer, Layer):          if isinstance(layer, Layer):
293              attrs["shapestore"]   = self.get_id(layer.ShapeStore())              attrs["shapestore"]   = self.get_id(layer.ShapeStore())
   
             lc = layer.GetClassification()  
             attrs["stroke"] = lc.GetDefaultLineColor().hex()  
             attrs["stroke_width"] = str(lc.GetDefaultLineWidth())  
             attrs["fill"] = lc.GetDefaultFill().hex()  
   
294              self.open_element("layer", attrs)              self.open_element("layer", attrs)
295              self.write_projection(layer.GetProjection())              self.write_projection(layer.GetProjection())
296              self.write_classification(layer)              self.write_classification(layer)
# Line 326  class SessionSaver(XMLWriter): Line 320  class SessionSaver(XMLWriter):
320    
321          field = layer.GetClassificationColumn()          field = layer.GetClassificationColumn()
322    
323          #          if field is not None:
324          # there isn't a classification of anything so do nothing              attrs["field"] = field
325          #              attrs["field_type"] = str(layer.GetFieldType(field))
         if field is None: return  
326    
         attrs["field"] = field  
         attrs["field_type"] = str(layer.GetFieldType(field))  
327          self.open_element("classification", attrs)          self.open_element("classification", attrs)
328    
329          for g in lc:          for g in lc:

Legend:
Removed from v.2616  
changed lines
  Added in v.2659

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26