[GRASS-SVN] r50113 - grass/trunk/gui/wxpython/psmap
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 9 16:21:26 EST 2012
Author: annakrat
Date: 2012-01-09 13:21:25 -0800 (Mon, 09 Jan 2012)
New Revision: 50113
Modified:
grass/trunk/gui/wxpython/psmap/dialogs.py
Log:
wxGUI/wxpsmap bug #1531 fixed (again)
Modified: grass/trunk/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/dialogs.py 2012-01-09 21:19:12 UTC (rev 50112)
+++ grass/trunk/gui/wxpython/psmap/dialogs.py 2012-01-09 21:21:25 UTC (rev 50113)
@@ -2925,9 +2925,11 @@
self.select = Select(self, id = wx.ID_ANY,# size = globalvar.DIALOG_GSELECT_SIZE,
type = 'vector', multiple = False,
updateOnPopup = True, onPopup = None)
- topologyType = [_("points"), _("lines"), _("areas")]
- self.vectorType = wx.RadioBox(self, id = wx.ID_ANY, label = " %s " % _("Data Type"), choices = topologyType,
- majorDimension = 3, style = wx.RA_SPECIFY_COLS)
+ topologyTypeTr = [_("points"), _("lines"), _("areas")]
+ self.topologyTypeList = ["points", "lines", "areas"]
+ self.vectorType = wx.RadioBox(self, id = wx.ID_ANY, label = " %s " % _("Data Type"), choices = topologyTypeTr,
+ majorDimension = 3, style = wx.RA_SPECIFY_COLS)
+
self.AddVector = wx.Button(self, id = wx.ID_ANY, label = _("Add"))
gridBagSizer.Add(text, pos = (0,0), flag = wx.ALIGN_CENTER_VERTICAL, border = 0)
@@ -3008,16 +3010,17 @@
mapset = '(' + vmap.split('@')[1] + ')'
except IndexError:
mapset = ''
- type = self.vectorType.GetStringSelection()
- record = "%s - %s" % (vmap,type)
+ idx = self.vectorType.GetSelection()
+ ttype = self.topologyTypeList[idx]
+ record = "%s - %s" % (vmap, ttype)
id = wx.NewId()
lpos = 1
label = mapname + mapset
- self.vectorList.insert(0, [vmap, type, id, lpos, label])
+ self.vectorList.insert(0, [vmap, ttype, id, lpos, label])
self.reposition()
self.listbox.InsertItems([record], 0)
- vector = VProperties(id, type)
+ vector = VProperties(id, ttype)
self.tmpDialogDict[id] = vector.GetInstruction()
self.tmpDialogDict[id]['name'] = vmap
@@ -3224,7 +3227,7 @@
if id == item[2]:
self.vectorName = item[0]
self.type = item[1]
- self.SetTitle(self.vectorName + " "+ _("properties"))
+ self.SetTitle(_("%s properties") % self.vectorName)
#vector map info
self.connection = True
More information about the grass-commit
mailing list