[GRASS-SVN] r51017 - in grass/branches/releasebranch_6_4/gui/wxpython: core vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 7 12:51:15 EST 2012


Author: martinl
Date: 2012-03-07 09:51:15 -0800 (Wed, 07 Mar 2012)
New Revision: 51017

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/core/settings.py
   grass/branches/releasebranch_6_4/gui/wxpython/vdigit/mapwindow.py
   grass/branches/releasebranch_6_4/gui/wxpython/vdigit/preferences.py
Log:
wxGUI/vdigit: color settings for new segment (line/boundary)
    (merge r50999 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/core/settings.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/core/settings.py	2012-03-07 15:54:10 UTC (rev 51016)
+++ grass/branches/releasebranch_6_4/gui/wxpython/core/settings.py	2012-03-07 17:51:15 UTC (rev 51017)
@@ -250,6 +250,14 @@
             'vdigit' : {
                 # symbology
                 'symbol' : {
+                    'newSegment' : {
+                        'enabled' : None,
+                        'color' : (255, 0, 0, 255)
+                        }, # red
+                    'newLine' : {
+                        'enabled' : None,
+                        'color' : (0, 86, 45, 255)
+                        }, # dark green
                     'highlight' : {
                         'enabled' : None,
                         'color' : (255, 255, 0, 255)

Modified: grass/branches/releasebranch_6_4/gui/wxpython/vdigit/mapwindow.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/vdigit/mapwindow.py	2012-03-07 15:54:10 UTC (rev 51016)
+++ grass/branches/releasebranch_6_4/gui/wxpython/vdigit/mapwindow.py	2012-03-07 17:51:15 UTC (rev 51017)
@@ -509,9 +509,13 @@
                           "removeVertex",
                           "editLine"):
             # set pen
-            self.pen = wx.Pen(colour = 'Red', width = 2, style = wx.SHORT_DASH)
-            self.polypen = wx.Pen(colour = 'dark green', width = 2, style = wx.SOLID)
-            
+            self.pen = wx.Pen(colour = UserSettings.Get(group = 'vdigit', key = 'symbol',
+                                                        subkey = ['newSegment', 'color']),
+                              width = 2, style = wx.SHORT_DASH)
+            self.polypen = wx.Pen(colour = UserSettings.Get(group = 'vdigit', key = 'symbol',
+                                                            subkey = ['newLine', 'color']),
+                                  width = 2, style = wx.SOLID)
+        
         if action in ("addVertex",
                       "removeVertex",
                       "splitLines"):

Modified: grass/branches/releasebranch_6_4/gui/wxpython/vdigit/preferences.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/vdigit/preferences.py	2012-03-07 15:54:10 UTC (rev 51016)
+++ grass/branches/releasebranch_6_4/gui/wxpython/vdigit/preferences.py	2012-03-07 17:51:15 UTC (rev 51017)
@@ -36,9 +36,9 @@
         
         # notebook
         notebook = wx.Notebook(parent = self, id = wx.ID_ANY, style = wx.BK_DEFAULT)
+        self._createGeneralPage(notebook)
         self._createSymbologyPage(notebook)
         self.digit.SetCategory()
-        self._createGeneralPage(notebook)
         self._createAttributesPage(notebook)
         self._createQueryPage(notebook)
 
@@ -89,7 +89,8 @@
             textLabel = wx.StaticText(panel, wx.ID_ANY, label)
             color = csel.ColourSelect(panel, id = wx.ID_ANY,
                                       colour = UserSettings.Get(group = 'vdigit', key = 'symbol',
-                                                              subkey = [key, 'color']), size = globalvar.DIALOG_COLOR_SIZE)
+                                                                subkey = [key, 'color']),
+                                      size = (40, 25))
             isEnabled = UserSettings.Get(group = 'vdigit', key = 'symbol',
                                          subkey = [key, 'enabled'])
             if isEnabled is not None:
@@ -508,7 +509,8 @@
         """
 
         return (
-            #            ("Background", "symbolBackground"),
+            (_("Digitize new line segment"), "newSegment"),
+            (_("Digitize new line/boundary"), "newLine"),
             (_("Highlight"), "highlight"),
             (_("Highlight (duplicates)"), "highlightDupl"),
             (_("Point"), "point"),



More information about the grass-commit mailing list