[GRASS-SVN] r48649 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 5 14:33:07 EDT 2011
Author: annakrat
Date: 2011-10-05 11:33:07 -0700 (Wed, 05 Oct 2011)
New Revision: 48649
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
partly revert r48646 (changes related to wxnviz were probably made by mistake)
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2011-10-05 18:06:04 UTC (rev 48648)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2011-10-05 18:33:07 UTC (rev 48649)
@@ -404,9 +404,6 @@
Map = self.Map, tree = self.tree, lmgr = self._layerManager)
self.MapWindow = self.MapWindow3D
self.MapWindow.SetCursor(self.cursors["default"])
- self.MapWindow3D.overlays = self.MapWindow2D.overlays
- self.MapWindow3D.textdict = self.MapWindow2D.textdict
- self.MapWindow3D.UpdateOverlays()
# add Nviz notebookpage
self._layerManager.AddNvizTools()
@@ -428,8 +425,6 @@
self.MapWindow3D.GetDisplay().Init()
del os.environ['GRASS_REGION']
- self.MapWindow3D.UpdateOverlays()
-
# switch from MapWindow to MapWindowGL
self._mgr.GetPane('2d').Hide()
self._mgr.GetPane('3d').Show()
@@ -1861,6 +1856,7 @@
"""
if self.MapWindow.dragid > -1:
id = self.MapWindow.dragid
+ self.MapWindow.dragid = -1
else:
# index for overlay layer in render
if len(self.MapWindow.textdict.keys()) > 0:
@@ -1881,23 +1877,28 @@
# delete object if it has no text or is not active
if text == '' or active == False:
try:
- self.MapWindow.pdc.ClearId(id)
- self.MapWindow.pdc.RemoveId(id)
+ self.MapWindow2D.pdc.ClearId(id)
+ self.MapWindow2D.pdc.RemoveId(id)
del self.MapWindow.textdict[id]
+ if self.IsPaneShown('3d'):
+ self.MapWindow3D.UpdateOverlays()
+ self.MapWindow.UpdateMap()
+ else:
+ self.MapWindow2D.UpdateMap(render = False, renderVector = False)
except:
pass
return
- self.MapWindow.pdc.ClearId(id)
- self.MapWindow.pdc.SetId(id)
+
self.MapWindow.textdict[id] = self.dialogs['text'].GetValues()
-## if self.MapWindow3D:
-## self.MapWindow3D.textdict[id] = self.dialogs['text'].GetValues()
-
- self.MapWindow2D.UpdateMap(render = False, renderVector = False)
- if self.MapWindow3D:
+ if self.IsPaneShown('3d'):
self.MapWindow3D.UpdateOverlays()
+ self.MapWindow3D.UpdateMap()
+ else:
+ self.MapWindow2D.pdc.ClearId(id)
+ self.MapWindow2D.pdc.SetId(id)
+ self.MapWindow2D.UpdateMap(render = False, renderVector = False)
self.MapWindow.mouse['use'] = 'pointer'
More information about the grass-commit
mailing list