[GRASS-SVN] r41358 -
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 8 13:24:41 EST 2010
Author: martinl
Date: 2010-03-08 13:24:41 -0500 (Mon, 08 Mar 2010)
New Revision: 41358
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py
Log:
wxGUI/georect: track pen color
Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py 2010-03-08 18:22:35 UTC (rev 41357)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py 2010-03-08 18:24:41 UTC (rev 41358)
@@ -886,16 +886,22 @@
wxCol = wx.Colour(col[0], col[1], col[2], 255)
wpx = UserSettings.Get(group='georect', key='symbol', subkey='width')
font = self.GetFont()
-
+
+ penOrig = polypenOrig = None
+
idx = 0
for gcp in self.mapcoordlist:
mapWin = gcp[coordtype][2]
if not self.list.IsChecked(idx) or not mapWin:
idx += 1
continue
-
- mapWin.pen = wx.Pen(colour=wxCol, width=wpx, style=wx.SOLID)
- mapWin.polypen = wx.Pen(colour=wxCol, width=wpx, style=wx.SOLID) # ?
+
+ if not penOrig:
+ penOrig = mapWin.pen
+ polypenOrig = mapWin.polypen
+ mapWin.pen = wx.Pen(colour=wxCol, width=wpx, style=wx.SOLID)
+ mapWin.polypen = wx.Pen(colour=wxCol, width=wpx, style=wx.SOLID) # ?
+
coord = mapWin.Cell2Pixel((gcp[coordtype][0], gcp[coordtype][1]))
mapWin.DrawCross(pdc=mapWin.pdcTmp, coords=coord,
size=5, text={ 'text' : '%s' % str(idx + 1),
@@ -906,9 +912,12 @@
coord[1] + 5,
5,
5]})
-
idx += 1
+ if penOrig:
+ mapWin.pen = penOrig
+ mapWin.polypen = polypenOrig
+
def SetGCPData(self, coordtype, coord, mapdisp=None, check=True):
"""
Inserts coordinates from mouse click on map
More information about the grass-commit
mailing list