[GRASS-SVN] r53715 - grass/trunk/gui/wxpython/gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 6 09:46:21 PST 2012
Author: martinl
Date: 2012-11-06 09:46:20 -0800 (Tue, 06 Nov 2012)
New Revision: 53715
Modified:
grass/trunk/gui/wxpython/gmodeler/frame.py
grass/trunk/gui/wxpython/gmodeler/model.py
Log:
wxGUI/modeler: recenter also loops
(merge r53714 from devbr6)
Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py 2012-11-06 17:45:09 UTC (rev 53714)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py 2012-11-06 17:46:20 UTC (rev 53715)
@@ -254,7 +254,7 @@
self.Destroy()
def OnSize(self, event):
- """Window resized, save to the model"""
+ """!Window resized, save to the model"""
self.ModelChanged()
event.Skip()
Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py 2012-11-06 17:45:09 UTC (rev 53714)
+++ grass/trunk/gui/wxpython/gmodeler/model.py 2012-11-06 17:46:20 UTC (rev 53715)
@@ -1416,6 +1416,12 @@
"""!Set items (id)"""
self.items = items
+ def OnDraw(self, dc):
+ """!Draw loop in canvas"""
+ self._setBrush()
+ ogl.RectangleShape.Recentre(self, dc) # re-center text
+ ogl.RectangleShape.OnDraw(self, dc)
+
class ModelCondition(ModelItem, ogl.PolygonShape):
def __init__(self, parent, x, y, id = -1, width = None, height = None, text = '',
items = { 'if' : [], 'else' : [] }):
More information about the grass-commit
mailing list