[GRASS-SVN] r34875 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Dec 14 11:37:52 EST 2008
Author: martinl
Date: 2008-12-14 11:37:52 -0500 (Sun, 14 Dec 2008)
New Revision: 34875
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
Log:
wxGUI: fix 'add new layer into layer tree'
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py 2008-12-14 16:22:36 UTC (rev 34874)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py 2008-12-14 16:37:52 UTC (rev 34875)
@@ -110,7 +110,8 @@
pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.TAB_TRAVERSAL | wx.FULL_REPAINT_ON_RESIZE):
wx.Panel.__init__(self, parent, id, pos, size, style)
-
+ self.SetName("GMConsole")
+
# initialize variables
self.Map = None
self.parent = parent # GMFrame | CmdPanel
@@ -522,7 +523,12 @@
# add layer into layer tree
cmd = dialog.notebookpanel.createCmd(ignoreErrors = True)
name = utils.GetLayerNameFromCmd(cmd, fullyQualified=True, param='output')
- mapTree = self.parent.parent.parent.curr_page.maptree
+ winName = self.parent.parent.parent.GetName()
+ if winName == 'LayerManager':
+ mapTree = self.parent.parent.parent.curr_page.maptree
+ else: # GMConsole
+ mapTree = self.parent.parent.parent.parent.curr_page.maptree
+
if dialog.outputType == 'raster':
lcmd = ['d.rast',
'map=%s' % name]
More information about the grass-commit
mailing list