[GRASS-SVN] r42067 - grass-addons/gui/wxpython/data_catalog
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Apr 30 13:49:03 EDT 2010
Author: rashadkm
Date: 2010-04-30 13:49:02 -0400 (Fri, 30 Apr 2010)
New Revision: 42067
Modified:
grass-addons/gui/wxpython/data_catalog/LayerTree.py
Log:
fixed brush and pen colour for v.planet.py
Modified: grass-addons/gui/wxpython/data_catalog/LayerTree.py
===================================================================
--- grass-addons/gui/wxpython/data_catalog/LayerTree.py 2010-04-30 16:56:48 UTC (rev 42066)
+++ grass-addons/gui/wxpython/data_catalog/LayerTree.py 2010-04-30 17:49:02 UTC (rev 42067)
@@ -484,38 +484,52 @@
Performs grass command for deleting a map
"""
item = self.GetSelection()
-
+ cmdflag = None
parent =self.GetItemParent(item)
if self.GetItemText(parent) == "Raster Map" :
+ #print str(self.GetItemText(item))
cmdflag = 'r.planet.py -a map=' + str(self.GetItemText(item))
- elif self.GetItemText(parent) == "Vector Map" :
- cmdflag = 'v.planet.py -a map=' + str(self.GetItemText(item)) + ' brush=' + str('155,155,155') + ' pen=' + str('155,155,155') + ' size=' +str('1,1')
- print cmdflag
+ else:
+ # child,cookie = self.GetNextChild(item,cookie=1)
+ if self.GetItemText(item) == 'colour':
+ col=self.GetItemTextColour(item)
+ else:
+ child,cookie = self.GetFirstChild(item)
+ print self.GetItemText(child)
+ col = self.GetItemTextColour(child)
+ if col.IsOk() is True:
+ col=str(col)
+ col = col.strip('(')
+ col = col.strip(')')
- if cmdflag:
-
- #command = ["r.planet.py", cmdflag]
- #gcmd.CommandThread(command,stdout=None,stderr=None).run()
+ # print str(self.GetItemText(item))
+ cmdflag = 'v.planet.py -a map=' + str(self.GetItemText(item)) + ' brush=' + str(col) + ' pen=' + str(col) + ' size=' +str('1,1')
+ #print cmdflag
+
+
+ if cmdflag is not None:
current = OssimPlanet(cmdflag)
current.start()
+
def OnOssim2( self,event ):
"""
Performs grass command for deleting a map
"""
item = self.GetSelection()
-
+ cmdflag = None
parent =self.GetItemParent(item)
if self.GetItemText(parent) == "Raster Map" :
cmdflag = 'r.planet.py -r map=' + str(self.GetItemText(item))
- elif self.GetItemText(parent) == "Vector Map" :
- cmdflag = 'v.planet.py -r map=' + str(self.GetItemText(item))
+ else:
+ if self.GetItemText(item) == 'colour':
+ previtem = self.GetItemParent(item)
+ cmdflag = 'v.planet.py -r map=' + str(self.GetItemText(previtem))
+ else:
+ cmdflag = 'v.planet.py -r map=' + str(self.GetItemText(item))
- if cmdflag:
-
- #command = ["r.planet.py", cmdflag]
- #gcmd.CommandThread(command,stdout=None,stderr=None).run()
+ if cmdflag is not None:
current = OssimPlanet(cmdflag)
current.start()
More information about the grass-commit
mailing list