[GRASS-SVN] r72381 - in grass/trunk/gui/wxpython: core gui_core lmgr mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 18 10:13:01 PDT 2018


Author: martinl
Date: 2018-03-18 10:13:01 -0700 (Sun, 18 Mar 2018)
New Revision: 72381

Modified:
   grass/trunk/gui/wxpython/core/settings.py
   grass/trunk/gui/wxpython/gui_core/preferences.py
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/mapdisp/main.py
Log:
wxGUI: add settings to show comp. region extent, see #3519

Modified: grass/trunk/gui/wxpython/core/settings.py
===================================================================
--- grass/trunk/gui/wxpython/core/settings.py	2018-03-18 17:08:21 UTC (rev 72380)
+++ grass/trunk/gui/wxpython/core/settings.py	2018-03-18 17:13:01 UTC (rev 72381)
@@ -190,6 +190,9 @@
                 'autoZooming': {
                     'enabled': False
                 },
+                'showCompExtent': {
+                    'enabled': False
+                },
                 'statusbarMode': {
                     'selection': 0
                 },

Modified: grass/trunk/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/preferences.py	2018-03-18 17:08:21 UTC (rev 72380)
+++ grass/trunk/gui/wxpython/gui_core/preferences.py	2018-03-18 17:13:01 UTC (rev 72381)
@@ -965,6 +965,22 @@
                       pos=(row, 0), span=(1, 2))
 
         #
+        # show computation extent
+        #
+        row += 1
+        showCompExtent = wx.CheckBox(parent=panel, id=wx.ID_ANY, label=_(
+            "Show computational region extent"), name="IsChecked")
+        showCompExtent.SetValue(
+            self.settings.Get(
+                group='display',
+                key='showCompExtent',
+                subkey='enabled'))
+        self.winId['display:showCompExtent:enabled'] = showCompExtent.GetId()
+
+        gridSizer.Add(showCompExtent,
+                      pos=(row, 0), span=(1, 2))
+        
+        #
         # mouse wheel zoom
         #
         row += 1

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2018-03-18 17:08:21 UTC (rev 72380)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2018-03-18 17:13:01 UTC (rev 72381)
@@ -2097,12 +2097,14 @@
         # set default properties
         mapdisplay.SetProperties(render=UserSettings.Get(
             group='display', key='autoRendering', subkey='enabled'),
-                              mode=UserSettings.Get(
+                                 mode=UserSettings.Get(
             group='display', key='statusbarMode', subkey='selection'),
-                              alignExtent=UserSettings.Get(
+                                 alignExtent=UserSettings.Get(
             group='display', key='alignExtent', subkey='enabled'),
-                              constrainRes=UserSettings.Get(
-            group='display', key='compResolution', subkey='enabled'))
+                                 constrainRes=UserSettings.Get(
+            group='display', key='compResolution', subkey='enabled'),
+                                 showCompExtent=UserSettings.Get(
+            group='display', key='showCompExtent', subkey='enabled'))
 
         self.displayIndex += 1
 

Modified: grass/trunk/gui/wxpython/mapdisp/main.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/main.py	2018-03-18 17:08:21 UTC (rev 72380)
+++ grass/trunk/gui/wxpython/mapdisp/main.py	2018-03-18 17:13:01 UTC (rev 72381)
@@ -535,6 +535,18 @@
 
         self.mapFrm.GetMapWindow().SetAlwaysRenderEnabled(False)
 
+        # set default properties
+        self.mapFrm.SetProperties(render=UserSettings.Get(
+            group='display', key='autoRendering', subkey='enabled'),
+                                 mode=UserSettings.Get(
+            group='display', key='statusbarMode', subkey='selection'),
+                                 alignExtent=UserSettings.Get(
+            group='display', key='alignExtent', subkey='enabled'),
+                                 constrainRes=UserSettings.Get(
+            group='display', key='compResolution', subkey='enabled'),
+                                 showCompExtent=UserSettings.Get(
+            group='display', key='showCompExtent', subkey='enabled'))
+
         self.Map.saveToFile.connect(lambda cmd: self.mapFrm.DOutFile(cmd))
         self.Map.dToRast.connect(lambda cmd: self.mapFrm.DToRast(cmd))
         self.Map.query.connect(



More information about the grass-commit mailing list