jschuengel: thuban/Extensions/umn_mapserver mf_export.py,1.8,1.9

cvs@intevation.de cvs at intevation.de
Fri Sep 3 19:01:47 CEST 2004


Author: jschuengel

Update of /thubanrepository/thuban/Extensions/umn_mapserver
In directory doto:/tmp/cvs-serv23587

Modified Files:
	mf_export.py 
Log Message:
Fixed a bug with deleting the layers from mapfile.
Now all layers will delete backwards from the.
CVS ----------------------------------------------------------------------


Index: mf_export.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/umn_mapserver/mf_export.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- mf_export.py	9 Aug 2004 11:39:37 -0000	1.8
+++ mf_export.py	3 Sep 2004 17:01:45 -0000	1.9
@@ -82,8 +82,10 @@
     for rnr in range(0, bigint+1, 1):
         if rnr not in indexlist:
             removelist.append(rnr)
-    for i in removelist:
-        map.remove_layer(i)
+    
+    for i in range(len(removelist), 0, -1):
+        map.remove_layer(removelist[i-1])
+
     map.set_layerorder(tuple(indexlist))
 
 def thuban_to_map(tb_context, map):
@@ -134,8 +136,7 @@
     out_file.write(thuban_umn_comment)
     out_file.write(text_in_file) # text in Datei schreiben
     out_file.close()    # Datei schliessen
-    
-    
+
 def export_mapfile(context):
     """
     Exports an existing mapobj and set all stuff from thuban to
@@ -169,7 +170,7 @@
     # this funktion will write a commend to the generated mapfile
     # that shows that the file is generated by thuban
     write_creatorcomment(path,file)
- 
+
  
 # check if an mapobj exists, to control the menuitem is available or not
 def _has_umn_mapobj(context):





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)