Hi Carlos, On Tuesday 02 May 2006 20:40, Carlos Nieves Ónega wrote: [...] > > The mouse motion event undraws the symbol/selection at it's last > > position. If the last position was behind another window e.g. the > > placing dialog or something else, the undraw (XOR-put) will fail as > > there is nothing to undraw. > > Yes, it could explain the bug... Since it didn't happen before, I > guess something changed. Could your last changes affect that part of > the code?
Yes I've changed the redraw of the placing buffer in o_redraw_all(). This fixed the wrong size of the symbol when zooming while placing a symbol. [...] > > To reproduce, second try: > > * start drawing a box > > * change the application using <alt> <tab> > > * go on drawing > > * change back to gschem > > * move the mouse > > > > Mmhh. This leeds to the following question: > > How does the redraw of the allready placed objects work? Is there > > an x_event that tells gschem that a window is not longer in front > > of gschem? > > I don't think so, but I think x_event_expose is called whenever the > gschem window get the focus again. Could it be used? Yeah that's the trick, I tried it. The function is called whenever a window is moved or moved away in front of gschem. Adding the line: case(ENDCOMP): just behind: case(ENDMOVE): case(ENDCOPY): solves the problem. But as shown with the second example, several states has to be fixed in x_event_expose(). I'll do it this weekend. Many thanks for the hint. Regards Werner