[wxPython-users] wx.lib.ogl - weirdness after
LineShape.InsertLineControlPoint
Pierre Hjälm
pierre.hjalm at dis.uu.se
Thu Jan 11 02:38:02 PST 2007
Gary Greyling <gary.greyling at gmail.com> writes:
> Pierre Hjälm wrote:
> > Ok, I must confess that I don't quite understand the question.
> >
> > If you look at how the demo does it, it creates a line and adds two
> > line control points. This makes the line attach to the edge of the shapes.
> >
> > I'm not quite sure how you would manage to do otherwise. Could you
> > perhaps put together an example of your problem?
> >
> Yes and in the demo it works fine as the demo never adds a point to the
> line for "bending" it. Once you add this point to the line, the place it
> attaches to the objects on either point becomes locked in place. Below
> is some code to demonstrate this.
>
Interestingly enough, it worked if you either used MakeLineControlPoints
to directly create more than 2 points, or if you called InsertLineControlPoint
before calling AddLine. That got me thinking in the right direction, and
sure enough, the bug was in the initialisation routine.
Could you please test the following (somewhat embarrasing) patch to _lines.py:
353c353
< self._initialised = True
---
> self._initialised = True
It seems to do the trick, but I'm not sure it won't have some annoying
side effects...
--
Pierre Hjälm - OGL warps my mind
More information about the wxpython-users
mailing list