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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 5 11:57:13 PDT 2013


Author: mmetz
Date: 2013-06-05 11:57:13 -0700 (Wed, 05 Jun 2013)
New Revision: 56617

Modified:
   grass/trunk/gui/wxpython/modules/vclean.py
Log:
wxGUI. v.clean interface cosmetics

Modified: grass/trunk/gui/wxpython/modules/vclean.py
===================================================================
--- grass/trunk/gui/wxpython/modules/vclean.py	2013-06-05 15:22:22 UTC (rev 56616)
+++ grass/trunk/gui/wxpython/modules/vclean.py	2013-06-05 18:57:13 UTC (rev 56617)
@@ -27,6 +27,7 @@
 from core             import globalvar
 from gui_core.gselect import Select
 from core.settings    import UserSettings
+from grass.script import core as grass
 
 
 class VectorCleaningFrame(wx.Frame):
@@ -131,6 +132,8 @@
                                          label=_('Select output vector map:'))
         self.selectionOutput = Select(parent=self.panel, id=wx.ID_ANY,
                                       size=globalvar.DIALOG_GSELECT_SIZE,
+                                      mapsets=[grass.gisenv()['MAPSET'],],
+                                      fullyQualified = False,
                                       type='vector')
 
         self.overwrite = wx.CheckBox(parent=self.panel, id=wx.ID_ANY,
@@ -204,6 +207,8 @@
         typeoptSizer = wx.BoxSizer(wx.HORIZONTAL)
         for num in range(0, self.n_ftypes):
             type_box = self.ftype_check[num]
+            if self.ftype[num] in ('point', 'line', 'area'):
+                type_box.SetValue(True);
             typeoptSizer.Add(item=type_box, flag=wx.ALIGN_LEFT, border=1)
 
         self.ftypeSizer.Add(item=typeoptSizer,
@@ -308,9 +313,6 @@
     def AddTool(self):
         snum = len(self.toolslines.keys())
         num = snum + 1
-        # tool number
-        tool_no = wx.StaticText(parent=self.ct_panel, id=3000 + num,
-                                label=str(num) + '.')
         # tool
         tool_cbox = wx.ComboBox(parent=self.ct_panel, id=1000 + num,
                                 size=(300, -1), choices=self.tool_desc_list,
@@ -323,20 +325,18 @@
                                style=wx.TE_NOHIDESEL)
         self.Bind(wx.EVT_TEXT, self.OnThreshValue, txt_ctrl)
 
-        # select
-        select = wx.CheckBox(parent=self.ct_panel, id=num)
+        # select with tool number
+        select = wx.CheckBox(parent=self.ct_panel, id=num, label=str(num) + '.')
         select.SetValue(False)
         self.Bind(wx.EVT_CHECKBOX, self.OnSelect, select)
 
         # start with row 1 and col 1 for nicer layout
-        self.ct_sizer.Add(item=tool_no, pos=(num, 1),
-                          flag=wx.ALIGN_CENTER_VERTICAL, border=5)
+        self.ct_sizer.Add(item=select, pos=(num, 1),
+                          flag=wx.ALIGN_CENTER | wx.RIGHT)
         self.ct_sizer.Add(item=tool_cbox, pos=(num, 2),
                           flag=wx.ALIGN_CENTER | wx.RIGHT, border=5)
         self.ct_sizer.Add(item=txt_ctrl, pos=(num, 3),
                           flag=wx.ALIGN_CENTER | wx.RIGHT, border=5)
-        self.ct_sizer.Add(item=select, pos=(num, 4),
-                          flag=wx.ALIGN_CENTER | wx.RIGHT)
 
         self.toolslines[num] = {'tool_desc': '',
                                 'tool': '',



More information about the grass-commit mailing list