[GRASS-SVN] r33195 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Sep 1 12:08:00 EDT 2008


Author: martinl
Date: 2008-09-01 12:07:59 -0400 (Mon, 01 Sep 2008)
New Revision: 33195

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI/vdigit: deselect lines on re-render
default layer opacity changed to 1.0


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-09-01 12:33:37 UTC (rev 33194)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-09-01 16:07:59 UTC (rev 33195)
@@ -345,6 +345,7 @@
             bg = wx.WHITE_BRUSH
             # bg = wx.Brush(self.GetBackgroundColour())
             pdc.SetBackground(bg)
+            pdc.RemoveAll()
             pdc.Clear()
             self.Refresh()
             pdc.EndDrawing()
@@ -801,7 +802,12 @@
         Erase the canvas
         """
         self.Draw(self.pdc, pdctype='clear')
-
+                  
+        if self.pdcVector:
+            self.Draw(self.pdcVector, pdctype='clear')
+        
+        self.Draw(self.pdcVector, pdctype='clear')
+        
     def DragMap(self, moveto):
         """
         Drag the entire map image for panning.
@@ -2837,8 +2843,14 @@
         qlayer = self.Map.GetListOfLayers(l_name=globalvar.QUERYLAYER)
         for layer in qlayer:
             self.Map.DeleteLayer(layer)
-        self.MapWindow.UpdateMap(render=True)
 
+        # deselect features in vdigit
+        if self.toolbars['vdigit']:
+            self.digit.driver.SetSelected([])
+            self.MapWindow.UpdateMap(render=True, renderVector=True)
+        else:
+            self.MapWindow.UpdateMap(render=True)
+        
         # update statusbar
         self.StatusbarUpdate()
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-09-01 12:33:37 UTC (rev 33194)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-09-01 16:07:59 UTC (rev 33195)
@@ -515,7 +515,7 @@
         self.EditLabel(self.layer_selected)
 
     def AddLayer(self, ltype, lname=None, lchecked=None,
-                 lopacity=None, lcmd=None, lgroup=None, lnviz=None):
+                 lopacity=1.0, lcmd=None, lgroup=None, lnviz=None):
         """Add new item to the layer tree, create corresponding MapLayer instance.
         Launch property dialog if needed (raster, vector, etc.)
 



More information about the grass-commit mailing list