[GRASS-SVN] r50131 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 11 05:15:17 EST 2012


Author: annakrat
Date: 2012-01-11 02:15:17 -0800 (Wed, 11 Jan 2012)
New Revision: 50131

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/psmap_dialogs.py
Log:
wxGUI/wxpsmap: bug #1531 fixed (merge from trunk, r50113)

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/psmap_dialogs.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/psmap_dialogs.py	2012-01-11 04:43:05 UTC (rev 50130)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/psmap_dialogs.py	2012-01-11 10:15:17 UTC (rev 50131)
@@ -2674,9 +2674,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)
@@ -2757,16 +2759,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
 
@@ -2973,7 +2976,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