[GRASS-SVN] r42696 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 2 16:06:19 EDT 2010
Author: martinl
Date: 2010-07-02 20:06:19 +0000 (Fri, 02 Jul 2010)
New Revision: 42696
Modified:
grass/trunk/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: close loop
Modified: grass/trunk/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2010-07-02 15:45:16 UTC (rev 42695)
+++ grass/trunk/gui/wxpython/gui_modules/gmodeler.py 2010-07-02 20:06:19 UTC (rev 42696)
@@ -1353,9 +1353,20 @@
# close loop
rel = ModelRelation(action, loop)
- print action.GetPosition()
self.AddLine(rel)
-
+ dx = loop.GetWidth() / 2 + 50
+ dy = action.GetHeight() / 2 + 50
+ rel.MakeLineControlPoints(0)
+ rel.InsertLineControlPoint(point = wx.RealPoint(loop.GetX() - loop.GetWidth() / 2,
+ loop.GetY()))
+ rel.InsertLineControlPoint(point = wx.RealPoint(action.GetX(),
+ action.GetY() + action.GetHeight() / 2))
+ rel.InsertLineControlPoint(point = wx.RealPoint(action.GetX(),
+ action.GetY() + dy))
+ rel.InsertLineControlPoint(point = wx.RealPoint(action.GetX() - dx,
+ action.GetY() + dy))
+ rel.InsertLineControlPoint(point = wx.RealPoint(action.GetX() - dx,
+ loop.GetY()))
self.canvas.Refresh()
class ModelCanvas(ogl.ShapeCanvas):
More information about the grass-commit
mailing list