Browse Source

r|v.proj: reorder options to avoid user confusion
wxGUI: fix r|v.proj functionality (see https://trac.osgeo.org/grass/changeset/65587)
(merge r65587-8, https://trac.osgeo.org/grass/changeset/65599)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@65956 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 9 years ago
parent
commit
975329ac48
3 changed files with 15 additions and 20 deletions
  1. 3 6
      gui/wxpython/gui_core/forms.py
  2. 5 6
      raster/r.proj/main.c
  3. 7 8
      vector/v.proj/main.c

+ 3 - 6
gui/wxpython/gui_core/forms.py

@@ -1175,12 +1175,8 @@ class CmdPanel(wx.Panel):
                         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 @@ class CmdPanel(wx.Panel):
             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
         #

+ 5 - 6
raster/r.proj/main.c

@@ -147,11 +147,6 @@ int main(int argc, char **argv)
     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 @@ int main(int argc, char **argv)
     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;

+ 7 - 8
vector/v.proj/main.c

@@ -71,12 +71,6 @@ int main(int argc, char *argv[])
 
     /* 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 @@ int main(int argc, char *argv[])
     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;