jschuengel: thuban/Extensions/umn_mapserver mf_export.py,1.6,1.7
cvs@intevation.de
cvs at intevation.de
Tue Aug 3 13:56:11 CEST 2004
Author: jschuengel
Update of /thubanrepository/thuban/Extensions/umn_mapserver
In directory doto:/tmp/cvs-serv14431
Modified Files:
mf_export.py
Log Message:
Removed the check if a mapobj exist, because its not needed anymore. The export function is only available if a mapobj exist.
Added an extra function to remove all layers.
Index: mf_export.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/umn_mapserver/mf_export.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mf_export.py 28 Jul 2004 12:36:27 -0000 1.6
+++ mf_export.py 3 Aug 2004 11:56:08 -0000 1.7
@@ -105,11 +105,9 @@
def export_mapfile(context):
- if hasattr(context.mainwindow.canvas.Map(), "extension_umn_mapobj"):
- theMap = context.mainwindow.canvas.Map().extension_umn_mapobj
- else:
- theMap = MF_Map(mapObj(""))
- context.mainwindow.canvas.Map().extension_umn_mapobj = theMap
+ theMap = context.mainwindow.canvas.Map().extension_umn_mapobj
+
+ theMap.remove_all_layers()
dlg = wxFileDialog(context.mainwindow, "Save file as...", ".", "",
"UMN MapServer Mapfiles (*.map)|*.map|" \
@@ -137,14 +135,6 @@
# this funktion will write a commend to the generated mapfile
# that shows that the file is generated by thuban
write_creatorcomment(path,file)
-
- # remove alle added layers from the temporary mapobj
- # this is necessary because the layers will add new on each save
- tb_map =context.mainwindow.canvas.Map()
- tb_layers = tb_map.Layers()
-
- for nr in range(len(tb_layers)-1, -1, -1):
- theMap.remove_layer(nr)
# check if an mapobj exists, to control the menuitem is available or not
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)