[GRASS-SVN] r65956 - in grass/branches/releasebranch_7_0: gui/wxpython/gui_core raster/r.proj vector/v.proj

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 17 23:03:51 PDT 2015


Author: martinl
Date: 2015-08-17 23:03:51 -0700 (Mon, 17 Aug 2015)
New Revision: 65956

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
   grass/branches/releasebranch_7_0/raster/r.proj/main.c
   grass/branches/releasebranch_7_0/vector/v.proj/main.c
Log:
r|v.proj: reorder options to avoid user confusion
wxGUI: fix r|v.proj functionality (see r65587)
       (merge r65587-8, r65599)


Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2015-08-18 06:01:51 UTC (rev 65955)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2015-08-18 06:03:51 UTC (rev 65956)
@@ -1175,12 +1175,8 @@
                         mapsets = None
                     if self.task.name in ('r.proj', 'v.proj') \
                             and p.get('name', '') == 'input':
-                        if self.task.name == 'r.proj':
-                            isRaster = True
-                        else:
-                            isRaster = False
                         selection = gselect.ProjSelect(parent = which_panel,
-                                                       isRaster = isRaster)
+                                                       isRaster = self.task.name == 'r.proj')
                         p['wxId'] = [ selection.GetId(), ]
                         selection.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
                         selection.Bind(wx.EVT_TEXT, self.OnUpdateSelection)
@@ -1784,8 +1780,9 @@
             pLocation['wxId-bind'] = pMapset['wxId']
         
         if pLocation and pMapset and pMap:
-            pLocation['wxId-bind'] +=  pMap['wxId']
+            # pLocation['wxId-bind'] +=  pMap['wxId']
             pMapset['wxId-bind'] = pMap['wxId']
+        
         #
         # determine panel size
         #

Modified: grass/branches/releasebranch_7_0/raster/r.proj/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.proj/main.c	2015-08-18 06:01:51 UTC (rev 65955)
+++ grass/branches/releasebranch_7_0/raster/r.proj/main.c	2015-08-18 06:03:51 UTC (rev 65956)
@@ -147,11 +147,6 @@
     module->description =
 	_("Re-projects a raster map from given location to the current location.");
 
-    inmap = G_define_standard_option(G_OPT_R_INPUT);
-    inmap->description = _("Name of input raster map to re-project");
-    inmap->required = NO;
-    inmap->guisection = _("Source");
-
     inlocation = G_define_standard_option(G_OPT_M_LOCATION);
     inlocation->required = YES;
     inlocation->label = _("Location containing input raster map");
@@ -162,9 +157,13 @@
     imapset->description = _("Default: name of current mapset");
     imapset->guisection = _("Source");
 
+    inmap = G_define_standard_option(G_OPT_R_INPUT);
+    inmap->description = _("Name of input raster map to re-project");
+    inmap->required = NO;
+    inmap->guisection = _("Source");
+    
     indbase = G_define_standard_option(G_OPT_M_DBASE);
     indbase->label = _("Path to GRASS database of input location");
-    indbase->guisection = _("Source");
 
     outmap = G_define_standard_option(G_OPT_R_OUTPUT);
     outmap->required = NO;

Modified: grass/branches/releasebranch_7_0/vector/v.proj/main.c
===================================================================
--- grass/branches/releasebranch_7_0/vector/v.proj/main.c	2015-08-18 06:01:51 UTC (rev 65955)
+++ grass/branches/releasebranch_7_0/vector/v.proj/main.c	2015-08-18 06:03:51 UTC (rev 65956)
@@ -71,12 +71,6 @@
 
     /* set up the options and flags for the command line parser */
 
-    mapopt = G_define_standard_option(G_OPT_V_INPUT);
-    mapopt->required = NO;
-    mapopt->label = _("Name of input vector map to re-project");
-    mapopt->description = NULL;
-    mapopt->guisection = _("Source");
-    
     ilocopt = G_define_standard_option(G_OPT_M_LOCATION);
     ilocopt->required = YES;
     ilocopt->label = _("Location containing input vector map");
@@ -87,10 +81,15 @@
     isetopt->description = _("Default: name of current mapset");
     isetopt->guisection = _("Source");
 
+    mapopt = G_define_standard_option(G_OPT_V_INPUT);
+    mapopt->required = NO;
+    mapopt->label = _("Name of input vector map to re-project");
+    mapopt->description = NULL;
+    mapopt->guisection = _("Source");
+    
     ibaseopt = G_define_standard_option(G_OPT_M_DBASE);
     ibaseopt->label = _("Path to GRASS database of input location");
-    ibaseopt->guisection = _("Source");
-
+    
     smax = G_define_option();
     smax->key = "smax";
     smax->type = TYPE_DOUBLE;



More information about the grass-commit mailing list