[GRASS-SVN] r33738 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 7 17:32:17 EDT 2008


Author: martinl
Date: 2008-10-07 17:32:17 -0400 (Tue, 07 Oct 2008)
New Revision: 33738

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/histogram.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI: histogram tool fixed (command layer type given as list of commands)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/histogram.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/histogram.py	2008-10-07 20:47:44 UTC (rev 33737)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/histogram.py	2008-10-07 21:32:17 UTC (rev 33738)
@@ -391,19 +391,22 @@
         dialog created in menuform.py
         """
         if dcmd:
-            self.SetHistLayer(dcmd)
+            name = utils.GetLayerNameFromCmd(dcmd, fullyQualified=True)
+            self.SetHistLayer(name)
         self.params = params
         self.propwin = propwin
 
         self.HistWindow.UpdateHist()
 
-    def SetHistLayer(self, cmd):
+    def SetHistLayer(self, name):
         """
         Set histogram layer
         """
-        self.mapname = utils.GetLayerNameFromCmd(cmd)
+        self.mapname = name
 
-        self.layer = self.Map.ChangeLayer(layer=self.layer, command=cmd, active=True)
+        self.layer = self.Map.ChangeLayer(layer=self.layer,
+                                          command=[['d.histogram', 'map=%s' % self.mapname],],
+                                          active=True)
 
         return self.layer
 
@@ -414,9 +417,7 @@
         """
 
         dlg = DefaultFontDialog(parent=self, id=wx.ID_ANY,
-                                title=_('Select font for histogram text'),
-                                encoding=self.encoding)
-        
+                                title=_('Select font for histogram text'))        
         dlg.fontlb.SetStringSelection(self.font, True)
         
         if dlg.ShowModal() == wx.ID_CANCEL:

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-10-07 20:47:44 UTC (rev 33737)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-10-07 21:32:17 UTC (rev 33738)
@@ -445,7 +445,7 @@
             # show new display
             self.histogramFrame.Show()
 
-        self.histogramFrame.SetHistLayer(['d.histogram', 'map=%s' % mapLayer.name])
+        self.histogramFrame.SetHistLayer(mapLayer.name)
         self.histogramFrame.HistWindow.UpdateHist()
         self.histogramFrame.Refresh()
         self.histogramFrame.Update()



More information about the grass-commit mailing list