[GRASS-SVN] r35513 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 20 15:14:14 EST 2009
Author: martinl
Date: 2009-01-20 15:14:14 -0500 (Tue, 20 Jan 2009)
New Revision: 35513
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
Log:
more p.mon-related fixes
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-01-20 20:04:40 UTC (rev 35512)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-01-20 20:14:14 UTC (rev 35513)
@@ -285,9 +285,13 @@
CloseButton(False).Layer(2))
# vector digitizer
elif name == "vdigit":
+ if self.gismanager:
+ log = self.gismanager.goutput
+ else:
+ log = None
self.toolbars['vdigit'] = toolbars.VDigitToolbar(parent=self, map=self.Map,
layerTree=self.tree,
- log=self.gismanager.goutput)
+ log=log)
for toolRow in range(0, self.toolbars['vdigit'].numOfRows):
self._mgr.AddPane(self.toolbars['vdigit'].toolbar[toolRow],
@@ -345,7 +349,8 @@
#
# update layer tree (-> enable 3d-rasters)
#
- self.tree.EnableItemType(type='3d-raster', enable=True)
+ if self.tree:
+ self.tree.EnableItemType(type='3d-raster', enable=True)
#
# update status bar
@@ -436,7 +441,8 @@
#
# update layer tree (-> disable 3d-rasters)
#
- self.tree.EnableItemType(type='3d-raster', enable=False)
+ if self.tree:
+ self.tree.EnableItemType(type='3d-raster', enable=False)
self.toolbars['map'].combo.SetValue (_("2D view"))
self.toolbars['map'].Enable2D(True)
@@ -573,7 +579,7 @@
else: # moveLine, deleteLine
self.MapWindow.mouse['box'] = 'box'
- elif self.gismanager.georectifying:
+ elif self.gismanager and self.gismanager.georectifying:
self.MapWindow.SetCursor(self.cursors["cross"])
else:
@@ -1638,7 +1644,8 @@
else:
Map = None
- self.mapFrm = MapFrame(parent=None, id=wx.ID_ANY, Map=Map, size=(640,480))
+ self.mapFrm = MapFrame(parent=None, id=wx.ID_ANY, Map=Map,
+ size=globalvar.MAP_WINDOW_SIZE)
#self.SetTopWindow(Map)
self.mapFrm.Show()
@@ -1685,8 +1692,10 @@
gm_map = MapApp(0)
# set title
- gm_map.mapFrm.SetTitle ("GRASS GIS - Map Display: " + title + " - Location: " + \
- grass.gisenv()['LOCATION_NAME'])
+ gm_map.mapFrm.SetTitle(_("GRASS GIS Map Display: " +
+ title +
+ " - Location: " + grass.gisenv()["LOCATION_NAME"]))
+
gm_map.MainLoop()
os.remove(cmdfilename)
Modified: grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2009-01-20 20:04:40 UTC (rev 35512)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py 2009-01-20 20:14:14 UTC (rev 35513)
@@ -97,9 +97,14 @@
#
# create nviz instance
#
- self.nvizThread = NvizThread(self.gismgr.goutput.cmd_stderr,
+ if self.gismgr:
+ logerr = self.gismgr.goutput.cmd_stderr
+ logmsg = self.gismgr.goutput.cmd_output
+ else:
+ logerr = logmsg = None
+ self.nvizThread = NvizThread(logerr,
self.parent.onRenderGauge,
- self.gismgr.goutput.cmd_output)
+ logmsg)
self.nvizThread.start()
time.sleep(.1)
self.nvizClass = self.nvizThread.nvizClass
@@ -338,6 +343,9 @@
@todo volumes
"""
+ if not self.tree:
+ return
+
listOfItems = []
item = self.tree.GetFirstChild(self.tree.root)[0]
self._GetDataLayers(item, listOfItems)
More information about the grass-commit
mailing list