jan: thuban/Thuban/Model save.py,1.45,1.46
cvs@intevation.de
cvs at intevation.de
Wed Jul 27 23:51:34 CEST 2005
Author: jan
Update of /thubanrepository/thuban/Thuban/Model
In directory doto:/tmp/cvs-serv6681
Modified Files:
save.py
Log Message:
(SessionSaver.write_layer): Don't write any attributes anymore for
the layer element.
(SessionSaver.write_classification): Even if there is no classification
field, still write the classification because the clnull (default)
symbol will not be defined anymore as part of the layer element.
Index: save.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/Model/save.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- save.py 6 May 2005 14:17:29 -0000 1.45
+++ save.py 27 Jul 2005 21:51:31 -0000 1.46
@@ -1,6 +1,6 @@
# Copyright (c) 2001-2005 by Intevation GmbH
# Authors:
-# Jan-Oliver Wagner <jan at intevation.de> (2004)
+# Jan-Oliver Wagner <jan at intevation.de> (2004-2005)
# Bernhard Herzog <bh at intevation.de> (2001-2004)
# Jonathan Coles <jonathan at intevation.de> (2003)
# Frank Koormann <frank at intevation.de> (2003)
@@ -291,12 +291,6 @@
if isinstance(layer, Layer):
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()
-
self.open_element("layer", attrs)
self.write_projection(layer.GetProjection())
self.write_classification(layer)
@@ -326,13 +320,10 @@
field = layer.GetClassificationColumn()
- #
- # there isn't a classification of anything so do nothing
- #
- if field is None: return
+ if field is not None:
+ attrs["field"] = field
+ attrs["field_type"] = str(layer.GetFieldType(field))
- attrs["field"] = field
- attrs["field_type"] = str(layer.GetFieldType(field))
self.open_element("classification", attrs)
for g in lc:
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)