[GRASS-SVN] r53714 - grass/branches/develbranch_6/gui/wxpython/gmodeler
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 6 09:45:10 PST 2012
Author: martinl
Date: 2012-11-06 09:45:09 -0800 (Tue, 06 Nov 2012)
New Revision: 53714
Modified:
grass/branches/develbranch_6/gui/wxpython/gmodeler/frame.py
grass/branches/develbranch_6/gui/wxpython/gmodeler/model.py
Log:
wxGUI/modeler: recenter also loops
Modified: grass/branches/develbranch_6/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gmodeler/frame.py 2012-11-06 16:30:21 UTC (rev 53713)
+++ grass/branches/develbranch_6/gui/wxpython/gmodeler/frame.py 2012-11-06 17:45:09 UTC (rev 53714)
@@ -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/branches/develbranch_6/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gmodeler/model.py 2012-11-06 16:30:21 UTC (rev 53713)
+++ grass/branches/develbranch_6/gui/wxpython/gmodeler/model.py 2012-11-06 17:45:09 UTC (rev 53714)
@@ -1418,6 +1418,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