[GRASS-SVN] r73881 - grass/branches/releasebranch_7_6/gui/wxpython/mapwin

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 28 06:01:02 PST 2018


Author: martinl
Date: 2018-12-28 06:01:02 -0800 (Fri, 28 Dec 2018)
New Revision: 73881

Modified:
   grass/branches/releasebranch_7_6/gui/wxpython/mapwin/buffered.py
Log:
wxGUI: only one color (red) for region extent (g76: merge r73826 from trunk)

Modified: grass/branches/releasebranch_7_6/gui/wxpython/mapwin/buffered.py
===================================================================
--- grass/branches/releasebranch_7_6/gui/wxpython/mapwin/buffered.py	2018-12-28 13:13:32 UTC (rev 73880)
+++ grass/branches/releasebranch_7_6/gui/wxpython/mapwin/buffered.py	2018-12-28 14:01:02 UTC (rev 73881)
@@ -1009,16 +1009,7 @@
         if self._properties.showRegion:
             compReg = self.Map.GetRegion()
             dispReg = self.Map.GetCurrentRegion()
-            reg = None
-            if utils.isInRegion(dispReg, compReg):
-                self.polypen = wx.Pen(
-                    colour=wx.Colour(0, 0, 255, 128),
-                    width=3, style=wx.SOLID)
-                reg = dispReg
-            else:
-                self.polypen = wx.Pen(colour=wx.Colour(255, 0, 0, 128),
-                                      width=3, style=wx.SOLID)
-                reg = compReg
+            reg = dispReg if utils.isInRegion(dispReg, compReg) else compReg
 
             regionCoords = []
             regionCoords.append((reg['w'], reg['n']))
@@ -1026,7 +1017,10 @@
             regionCoords.append((reg['e'], reg['s']))
             regionCoords.append((reg['w'], reg['s']))
             regionCoords.append((reg['w'], reg['n']))
+
             # draw region extent
+            self.polypen = wx.Pen(colour=wx.Colour(255, 0, 0, 128),
+                                  width=3, style=wx.SOLID)
             self.DrawLines(pdc=self.pdcTransparent, polycoords=regionCoords)
 
     def EraseMap(self):



More information about the grass-commit mailing list