[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-dev: gschem bug when copying components



Hi Peter,

El vie, 08-09-2006 a las 14:54 +0100, Peter Clifton escribió:
> On Fri, 2006-09-08 at 11:36 +0100, Peter Clifton wrote:
> > On Fri, 2006-09-08 at 10:42 +0200, Werner Hoch wrote:
> > > Hi Peter,
> > > 
> > > On Friday 08 September 2006 10:01, Peter Clifton wrote:
> > > > Steps to reproduce...
> > > >
> > > > 1. Place a component (e.g. resistor)
> > > >
> > > > 2. Use copy mode to duplicate that component (don't place it yet)
> > > >
> > > > 3. Press middle mouse button to rotate the new component
> > > >
> > > > Outcome...
> > > >
> > > > Original component is also rotated (leaving a rendering glitch (image
> > > > of the original, non-rotated component).
> 
> Looks like the reason for this is that the code doesn't actually make a
> copy of the object until the final place. Any rotation done with the
> middle mouse button will rotate the original as well, and this is
> redrawn once the place happens (or if the page is panned or zoomed).

You are right. That's the reason why I had to start again with this
issue, but with a different algorithm.

> Since there isn't likely an easy fix for this, what are people's
> thoughts on disabling the ability to rotate whilst copying until
> Carlos's work is merged?

No problem with this, but check first the patch against CVS.

> (I'm not sure if Carlos's patch fixes the problem, but I can't see the
> point in having to do implement a complex fix it twice)

The patch makes a copy of the objects first, and then places them into
the complex place list. This way the original aren't modified.
In fact, the problem you describe is fixed.

Unfortunately, the patch is not (yet) perfect. Try this:
  - Place a component (e.g. resistor)
  - Use copy mode to duplicate that component (don't place it yet)
  - Press middle mouse button to rotate the new component
  - Do any pan/zoom (zoom in, for example). 
Steps 1-3 are done correctly, but when doing step 4, you will notice
that the component to be placed is also drawn as it were rotated next to
the original component.

The original components are not modified. I think the problem is in the
redraw functions (o_redraw_all, called from a_pan_general, which is
called from pan and zoom functions): they draw the complex place list
without translating it to the cursor position. I haven't found a fix
yet....

The rotating while moving is working. So if you still want to disable
this feature because of the zooming/paning issue, I would disable any
calls to zoom/pan actions while inside any other action. 

Regards,

Carlos



_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev