[GRASS-SVN] r35514 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jan 20 15:15:39 EST 2009
Author: martinl
Date: 2009-01-20 15:15:39 -0500 (Tue, 20 Jan 2009)
New Revision: 35514
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
Log:
more p.mon-related fixes
(merge from trunk, r35513)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2009-01-20 20:14:14 UTC (rev 35513)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2009-01-20 20:15:39 UTC (rev 35514)
@@ -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],
@@ -350,7 +354,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
@@ -441,7 +446,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)
@@ -578,7 +584,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:
@@ -1643,7 +1649,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()
@@ -1690,8 +1697,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()
if grass.gisenv().has_key("MONITOR"):
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py 2009-01-20 20:14:14 UTC (rev 35513)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_mapdisp.py 2009-01-20 20:15:39 UTC (rev 35514)
@@ -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