[GRASS-SVN] r68975 - grass/trunk/gui/wxpython/modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jul 15 07:32:36 PDT 2016


Author: martinl
Date: 2016-07-15 07:32:36 -0700 (Fri, 15 Jul 2016)
New Revision: 68975

Modified:
   grass/trunk/gui/wxpython/modules/import_export.py
Log:
wxGUI/import: move override check from import settings tab to the main tab (it's commonly used option)

Modified: grass/trunk/gui/wxpython/modules/import_export.py
===================================================================
--- grass/trunk/gui/wxpython/modules/import_export.py	2016-07-15 13:14:26 UTC (rev 68974)
+++ grass/trunk/gui/wxpython/modules/import_export.py	2016-07-15 14:32:36 UTC (rev 68975)
@@ -11,7 +11,7 @@
  - :class:`DxfImportDialog`
  - :class:`ReprojectionDialog`
 
-(C) 2008-2015 by the GRASS Development Team
+(C) 2008-2016 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.
@@ -80,6 +80,10 @@
         self.list = LayersList(parent=self.panel, columns=columns)
         self.list.LoadData()
 
+        self.override = wx.CheckBox(
+            parent=self.panel, id=wx.ID_ANY,
+            label=_("Override projection check (use current location's projection)"))
+
         self.overwrite = wx.CheckBox(
             parent=self.panel, id=wx.ID_ANY,
             label=_("Allow output files to overwrite existing files"))
@@ -167,6 +171,9 @@
             flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.EXPAND,
             border=5)
 
+        dialogSizer.Add(item=self.override, proportion=0,
+                        flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
+
         dialogSizer.Add(item=self.overwrite, proportion=0,
                         flag=wx.LEFT | wx.RIGHT | wx.BOTTOM, border=5)
 
@@ -313,7 +320,7 @@
 
         layers = self.list.GetLayers()
 
-        if differentProjLayers and '-o' not in self.getSettingsPageCmd():
+        if differentProjLayers and not self.override.IsChecked(): # '-o' not in self.getSettingsPageCmd():
 
             dlg = ReprojectionDialog(
                 parent=self,
@@ -437,6 +444,9 @@
             cmd.append('input=%s' % idsn)
             cmd.append('output=%s' % output)
 
+            if self.override.IsChecked():
+                cmd.append('-o')
+
             if self.overwrite.IsChecked():
                 cmd.append('--overwrite')
 
@@ -474,7 +484,7 @@
 
     def _getBlackListedFlags(self):
         """Get flags which will not be showed in Settings page"""
-        return ['overwrite']
+        return ['overwrite', 'o']
 
 
 class OgrImportDialog(ImportDialog):
@@ -574,6 +584,9 @@
             cmd.append('layer=%s' % layer)
             cmd.append('output=%s' % output)
 
+            if self.override.IsChecked():
+                cmd.append('-o')
+
             if self.overwrite.IsChecked():
                 cmd.append('--overwrite')
 
@@ -615,7 +628,7 @@
 
     def _getBlackListedFlags(self):
         """Get flags which will not be showed in Settings page"""
-        return ['overwrite']
+        return ['overwrite', 'o']
 
 
 class GdalOutputDialog(wx.Dialog):



More information about the grass-commit mailing list