[GRASS-SVN] r32644 - in grass/branches/develbranch_6/gui/wxpython: gui_modules vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 8 09:25:09 EDT 2008


Author: martinl
Date: 2008-08-08 09:25:09 -0400 (Fri, 08 Aug 2008)
New Revision: 32644

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
   grass/branches/develbranch_6/gui/wxpython/vdigit/select.cpp
Log:
wxGUI/vdigit: fix query tool (length)

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2008-08-08 12:59:16 UTC (rev 32643)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2008-08-08 13:25:09 UTC (rev 32644)
@@ -734,7 +734,7 @@
     def OnQuery(self, event):
         """Query selected lines/boundaries"""
         Debug.msg(2, "Digittoolbar.OnQuery(): %s" % \
-                      UserSettings.Get(group='vdigit', key='query', subkey='type'))
+                      UserSettings.Get(group='vdigit', key='query', subkey='selection'))
         self.action="queryLine"
         self.parent.MapWindow.mouse['box'] = 'box'
 

Modified: grass/branches/develbranch_6/gui/wxpython/vdigit/select.cpp
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/vdigit/select.cpp	2008-08-08 12:59:16 UTC (rev 32643)
+++ grass/branches/develbranch_6/gui/wxpython/vdigit/select.cpp	2008-08-08 13:25:09 UTC (rev 32644)
@@ -58,26 +58,26 @@
     List = Vect_new_list();
 
     if (box) {
-      bbox = Vect_new_line_struct();
-
-      Vect_append_point(bbox, x1, y1, z1);
-      Vect_append_point(bbox, x2, y1, z2);
-      Vect_append_point(bbox, x2, y2, z1);
-      Vect_append_point(bbox, x1, y2, z2);
-      Vect_append_point(bbox, x1, y1, z1);
-
-      Vect_select_lines_by_polygon (display->mapInfo, bbox, 0, NULL, type, List);
-      if (List->n_values == 0) {
-	  return ids;
-      }
+	bbox = Vect_new_line_struct();
+	
+	Vect_append_point(bbox, x1, y1, z1);
+	Vect_append_point(bbox, x2, y1, z2);
+	Vect_append_point(bbox, x2, y2, z1);
+	Vect_append_point(bbox, x1, y2, z2);
+	Vect_append_point(bbox, x1, y1, z1);
+	
+	Vect_select_lines_by_polygon (display->mapInfo, bbox, 0, NULL, type, List);
+	if (List->n_values == 0) {
+	    return ids;
+	}
     }
-
+    
     G_debug(3, "wxDigit.SelectLinesByQuery(): lines=%d", List->n_values);
 
     Vedit_select_by_query(display->mapInfo,
 			  type, layer, thresh, query,
 			  List);
-
+    
     ids = display->ListToVector(List); // TODO
 
     G_debug(3, "wxDigit.SelectLinesByQuery(): lines=%d", List->n_values);



More information about the grass-commit mailing list