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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 31 08:06:15 EDT 2011


Author: martinl
Date: 2011-05-31 05:06:15 -0700 (Tue, 31 May 2011)
New Revision: 46472

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdigit.py
Log:
wxGUI/vdigit: minor fixes in vector digitizer
	      (merge r46471 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-05-31 12:04:02 UTC (rev 46471)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py	2011-05-31 12:06:15 UTC (rev 46472)
@@ -679,7 +679,7 @@
         
         self.first = True
         params = {} # no initial options parameters
-
+        
         # deselect active item
         if self.layer_selected:
             self.SelectItem(self.layer_selected, select = False)
@@ -732,19 +732,15 @@
                                             text = '', ct_type = 1, wnd = ctrl)
         else: # add first layer to the layer tree (first child of root)
             layer = self.PrependItem(parent = self.root, text = '', ct_type = 1, wnd = ctrl)
-
+        
         # layer is initially unchecked as inactive (beside 'command')
         # use predefined value if given
         if lchecked is not None:
             checked = lchecked
         else:
             checked = True
-
+        
         self.CheckItem(layer, checked = checked)
-
-        # select new item
-        self.SelectItem(layer, select = True)
-        self.layer_selected = layer
         
         # add text and icons for each layer ltype
         label =  _('(double click to set properties)') + ' ' * 35
@@ -795,9 +791,9 @@
         elif ltype == 'group':
             self.SetItemImage(layer, self.folder)
             self.SetItemText(layer, grouptext)
-
+        
         self.first = False
-
+        
         if ltype != 'group':
             if lcmd and len(lcmd) > 1:
                 cmd = lcmd
@@ -848,7 +844,7 @@
                                          l_active = checked, l_hidden = False,
                                          l_opacity = lopacity, l_render = render)
             self.GetPyData(layer)[0]['maplayer'] = maplayer
-
+            
             # run properties dialog if no properties given
             if len(cmd) == 0:
                 self.PropertiesDialog(layer, show = True)
@@ -861,7 +857,11 @@
                                     'maplayer' : None,
                                     'propwin'  : None}, 
                                    None))
-
+        
+        # select new item
+        self.SelectItem(layer, select = True)
+        self.layer_selected = layer
+        
         # use predefined layer name if given
         if lname:
             if ltype == 'group':
@@ -1133,7 +1133,6 @@
             bgmap = UserSettings.Get(group = 'vdigit', key = 'bgmap', subkey = 'value',
                                      internal = True)
             
-        if digitToolbar:
             if digitToolbar.GetLayer() == mapLayer:
                 self._setGradient('vdigit')
             elif bgmap == mapLayer.GetName():

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2011-05-31 12:04:02 UTC (rev 46471)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2011-05-31 12:06:15 UTC (rev 46472)
@@ -1081,8 +1081,7 @@
         self.parent.MapWindow.mouse['box'] = 'box'
 
     def OnSelectMap (self, event):
-        """
-        Select vector map layer for editing
+        """!Select vector map layer for editing
 
         If there is a vector map layer already edited, this action is
         firstly terminated. The map layer is closed. After this the

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdigit.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdigit.py	2011-05-31 12:04:02 UTC (rev 46471)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxvdigit.py	2011-05-31 12:06:15 UTC (rev 46472)
@@ -403,8 +403,8 @@
                                             'line'   : line,
                                             'offset' : offset })
         
-        Debug.msg(3, "IVDigit._addActionToChangeset(): changeset=%d, type=%d, line=%d, offset=%d",
-                  changeset, type, line, offset)
+        Debug.msg(3, "IVDigit._addActionToChangeset(): changeset=%d, add=%d, line=%d, offset=%d",
+                  changeset, add, line, offset)
         
     def _removeActionFromChangeset(self, changeset, line, add):
         """!Remove action from changeset



More information about the grass-commit mailing list