瀏覽代碼

wxGUI/vdigit: break lines before adding centroids (add new area)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61473 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年之前
父節點
當前提交
c2abecf487
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      gui/wxpython/vdigit/wxdigit.py

+ 7 - 7
gui/wxpython/vdigit/wxdigit.py

@@ -18,7 +18,7 @@ List of classes:
     (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.
@@ -1769,9 +1769,13 @@ class IVDigit:
         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()
@@ -1823,10 +1827,6 @@ class IVDigit:
                     
             Vect_destroy_line_struct(bpoints)
         
-        # break at intersection
-        if self._settings['breakLines']:
-            self._breakLineAtIntersection(newline, self.poPoints)
-
         self._addChangeset()
         
         if ftype & GV_AREA: