[GRASS-SVN] r32642 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 8 08:57:13 EDT 2008


Author: martinl
Date: 2008-08-08 08:57:13 -0400 (Fri, 08 Aug 2008)
New Revision: 32642

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py
Log:
wxGUI/vdigit: fix copy features in edited vector map

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-08-08 12:46:26 UTC (rev 32641)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-08-08 12:57:13 UTC (rev 32642)
@@ -1270,7 +1270,7 @@
                     self.mouse['box'] = 'box'
 
             elif digitToolbar.action == "copyLine":
-                self.copyIds = None
+                self.copyIds = []
                 self.layerTmp = None
 
             elif digitToolbar.action == "zbulkLine":

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py	2008-08-08 12:46:26 UTC (rev 32641)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py	2008-08-08 12:57:13 UTC (rev 32642)
@@ -1070,7 +1070,7 @@
 
         return ret
         
-    def CopyLine(self, ids=None):
+    def CopyLine(self, ids=[]):
         """Copy features from (background) vector map
 
         @param ids list of line ids to be copied
@@ -1078,7 +1078,11 @@
         @return number of copied features
         @return -1 on error
         """
-        ret = self.digit.CopyLines(ids, str(UserSettings.Get(group='vdigit', key='backgroundMap', subkey='value')))
+        bgmap = str(UserSettings.Get(group='vdigit', key='backgroundMap', subkey='value'))
+        if len(bgmap) > 0:
+            ret = self.digit.CopyLines(ids, bgmap)
+        else:
+            ret = self.digit.CopyLines(ids, None)
 
         if ret > 0:
             self.toolbar.EnableUndo()



More information about the grass-commit mailing list