ソースを参照

wxGUI: 'add layer' checkbox only for rasters and vectors
cosmetics in MultiImportDialog layout
(merge from devbr6, https://trac.osgeo.org/grass/changeset/32959)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32960 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 年 前
コミット
6446b300cf
2 ファイル変更11 行追加11 行削除
  1. 10 10
      gui/wxpython/gui_modules/gdialogs.py
  2. 1 1
      gui/wxpython/gui_modules/menuform.py

+ 10 - 10
gui/wxpython/gui_modules/gdialogs.py

@@ -763,7 +763,7 @@ class MultiImportDialog(wx.Dialog):
                                                      buttonText=_('Browse'),
                                                      startDirectory=os.getcwd(),
                                                      changeCallback=self.OnSetInput)
-            self.formatText = wx.StaticText(self.panel, id=wx.ID_ANY, label=_("Choose file extension:"))
+            self.formatText = wx.StaticText(self.panel, id=wx.ID_ANY, label=_("Select file extension:"))
             self.format = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY, size=(100, -1),
                                       value="")
             if self.inputType == 'gdal':
@@ -808,22 +808,22 @@ class MultiImportDialog(wx.Dialog):
         inputBox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
                                 label=" %s " % self.inputTitle)
         inputSizer = wx.StaticBoxSizer(inputBox, wx.HORIZONTAL)
-        gridSizer = wx.GridBagSizer(vgap=5, hgap=5)
         
+        gridSizer = wx.FlexGridSizer(cols=2, vgap=5, hgap=5)
+       
         gridSizer.Add(item=self.inputText,
-                      flag=wx.ALIGN_CENTER_VERTICAL, pos=(0, 0))
+                      flag=wx.ALIGN_CENTER_VERTICAL)
+        gridSizer.AddGrowableCol(1)
         gridSizer.Add(item=self.input,
-                      flag=wx.EXPAND, pos=(0, 1))
+                      flag=wx.EXPAND | wx.ALL)
         
         if self.inputType != 'dxf':
             gridSizer.Add(item=self.formatText,
-                          flag=wx.ALIGN_CENTER_VERTICAL, pos=(1, 0))
-            gridSizer.Add(item=self.format,
-                          pos=(1, 1))
+                          flag=wx.ALIGN_CENTER_VERTICAL)
+            gridSizer.Add(item=self.format)
         
-        gridSizer.AddGrowableCol(1)
-        inputSizer.Add(item=gridSizer, proportion=0,
-                       flag=wx.EXPAND)
+        inputSizer.Add(item=gridSizer, proportion=1,
+                       flag=wx.EXPAND | wx.ALL)
         
         dialogSizer.Add(item=inputSizer, proportion=0,
                         flag=wx.ALL | wx.EXPAND, border=5)

+ 1 - 1
gui/wxpython/gui_modules/menuform.py

@@ -700,7 +700,7 @@ class mainFrame(wx.Frame):
                 if p.get('name', '') == 'output':
                     self.outputType = p.get('prompt', None)
                     break
-            if self.outputType:
+            if self.outputType in ('raster', 'vector', '3d-raster'):
                 # add newly created map into layer tree
                 self.addbox = wx.CheckBox(parent=self.panel,
                                           label=_('Add created map into layer tree'), style = wx.NO_BORDER)