[GRASS-SVN] r43781 - in grass/trunk/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Oct 4 15:03:43 EDT 2010


Author: martinl
Date: 2010-10-04 19:03:43 +0000 (Mon, 04 Oct 2010)
New Revision: 43781

Modified:
   grass/trunk/gui/wxpython/gui_modules/gdialogs.py
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI/bulk dialog: fix -o flag
          do not override proj check by default
          name for grass map editable
(merge r43780 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2010-10-04 19:01:37 UTC (rev 43780)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2010-10-04 19:03:43 UTC (rev 43781)
@@ -1046,7 +1046,7 @@
         """!Add imported/linked layers into layer tree"""
         self.commandId += 1
         
-        if not self.add.IsChecked():
+        if not self.add.IsChecked() or returncode != 0:
             return
         
         maptree = self.parent.curr_page.maptree
@@ -1061,8 +1061,8 @@
         if self.importType == 'gdal':
             cmd = ['d.rast',
                    'map=%s' % name]
-            if UserSettings.Get(group='cmd', key='rasterOpaque', subkey='enabled'):
-                cmd.append('-n')
+            if UserSettings.Get(group='cmd', key='rasterOverlay', subkey='enabled'):
+                cmd.append('-o')
                 
             item = maptree.AddLayer(ltype='raster',
                                     lname=name,
@@ -1103,7 +1103,6 @@
         if not link:
             self.overrideCheck = wx.CheckBox(parent=self.panel, id=wx.ID_ANY,
                                              label=_("Override projection (use location's projection)"))
-            self.overrideCheck.SetValue(True)
         
         if link:
             self.add.SetLabel(_("Add linked layers into layer tree"))
@@ -1249,11 +1248,10 @@
             self.btn_run.Enable(False)
         
 class LayersList(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin,
-                 listmix.CheckListCtrlMixin):
-#                 listmix.CheckListCtrlMixin, listmix.TextEditMixin):
+                 listmix.CheckListCtrlMixin, listmix.TextEditMixin):
     """!List of layers to be imported (dxf, shp...)"""
-    def __init__(self, parent, pos=wx.DefaultPosition,
-                 log=None):
+    def __init__(self, parent, pos = wx.DefaultPosition,
+                 log = None):
         self.parent = parent
         
         wx.ListCtrl.__init__(self, parent, wx.ID_ANY,
@@ -1263,8 +1261,8 @@
 
         # setup mixins
         listmix.ListCtrlAutoWidthMixin.__init__(self)
-        # listmix.TextEditMixin.__init__(self)
-        
+        listmix.TextEditMixin.__init__(self)
+
         self.InsertColumn(0, _('Layer'))
         self.InsertColumn(1, _('Layer name'))
         self.InsertColumn(2, _('Name for GRASS map'))

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2010-10-04 19:01:37 UTC (rev 43780)
+++ grass/trunk/gui/wxpython/wxgui.py	2010-10-04 19:03:43 UTC (rev 43781)
@@ -99,7 +99,7 @@
     """
     def __init__(self, parent, id = wx.ID_ANY, title = _("GRASS GIS Layer Manager"),
                  workspace = None,
-                 size = (575, 450), style = wx.DEFAULT_FRAME_STYLE, **kwargs):
+                 size = (600, 450), style = wx.DEFAULT_FRAME_STYLE, **kwargs):
         self.parent    = parent
         self.baseTitle = title
         self.iconsize  = (16, 16)



More information about the grass-commit mailing list