[GRASS-SVN] r61509 - in grass/branches/releasebranch_7_0/gui/wxpython: core vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 4 02:48:30 PDT 2014


Author: martinl
Date: 2014-08-04 02:48:30 -0700 (Mon, 04 Aug 2014)
New Revision: 61509

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py
   grass/branches/releasebranch_7_0/gui/wxpython/vdigit/wxdigit.py
Log:
wxGUI/vdigit: break lines before adding centroids (add new area)
              enable snapping to verteces by default
              enable 'break lines on intersection' by default
              (merge r61472-4 from trunk)


Modified: grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py	2014-08-03 22:32:08 UTC (rev 61508)
+++ grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py	2014-08-04 09:48:30 UTC (rev 61509)
@@ -392,7 +392,7 @@
                     'units' : 'screen pixels'
                     },
                 'snapToVertex' : {
-                    'enabled' : False
+                    'enabled' : True
                     },
                 # digitize new record
                 'addRecord' : {
@@ -455,7 +455,7 @@
                     },
                 # break lines on intersection
                 'breakLines' : {
-                    'enabled' : False,
+                    'enabled' : True,
                     },
                 # close boundary (snap to the first node)
                 'closeBoundary' : {

Modified: grass/branches/releasebranch_7_0/gui/wxpython/vdigit/wxdigit.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/vdigit/wxdigit.py	2014-08-03 22:32:08 UTC (rev 61508)
+++ grass/branches/releasebranch_7_0/gui/wxpython/vdigit/wxdigit.py	2014-08-04 09:48:30 UTC (rev 61509)
@@ -17,7 +17,7 @@
 (and NumPy would be an excellent candidate for acceleration via
 e.g. OpenCL or CUDA; I'm surprised it hasn't happened already).
 
-(C) 2007-2011, 2013 by the GRASS Development Team
+(C) 2007-2014 by the GRASS Development Team
 
 This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -1762,9 +1762,13 @@
         else:
             fids.append(newline)
         
-        left = right = -1
+        # break at intersection
+        if self._settings['breakLines']:
+            self._breakLineAtIntersection(newline, self.poPoints)
+            
+        # add centroids for left/right area
         if ftype & GV_AREA:
-            # add centroids for left/right area
+            left = right = -1
             bpoints = Vect_new_line_struct()
             cleft = c_int()
             cright = c_int()
@@ -1816,10 +1820,6 @@
                     
             Vect_destroy_line_struct(bpoints)
         
-        # break at intersection
-        if self._settings['breakLines']:
-            self._breakLineAtIntersection(newline, self.poPoints)
-
         self._addChangeset()
         
         if ftype & GV_AREA:



More information about the grass-commit mailing list