From: Pere Pujal i Carabantes <pere@fo...> - 2010-03-21 00:27:03
I've not tested if there are more magic tools afected, but at least
those 3 have problems.
Zoom and perspective degrades quickly, rails only joins in each drag,
but not across drags.
They used to keep some data picked at switchin and do its calculations
from it. For example zoom and perspective keeps a copy of the canvas and
scale/stretch from it until it is cleared at switchout.
Now switchout/switchin is called at each click, so the data is replaced
by new one and things that relay on it get wrong.
The problem seem to be the calls in lines 3796 3798 in current cvs.
Ideas on how can be fixed?
From: Bill Kendrick <nbs@so...> - 2010-03-22 20:30:44
On Sun, Mar 21, 2010 at 01:26:48AM +0100, Pere Pujal i Carabantes wrote:
> Now switchout/switchin is called at each click, so the data is replaced
> by new one and things that relay on it get wrong.
> The problem seem to be the calls in lines 3796 3798 in current cvs.
> Ideas on how can be fixed?
Hi Pere, I see what you mean. Good think I 'disliked' those changes.
So it's meant for Magic tools that 'abuse' the canvas by drawing
widgets/etc. onto it. They need to remove them prior to us recording
the canvas into the undo buffer.
I'll see what I can do. Thanks!
Sent from my computer
From: Pere Pujal i Carabantes <pere@fo...> - 2010-03-22 21:28:39
El dl 22 de 03 de 2010 a les 13:30 -0700, en/na Bill Kendrick va
> So it's meant for Magic tools that 'abuse' the canvas by drawing
> widgets/etc. onto it. They need to remove them prior to us recording
> the canvas into the undo buffer.
I see some things that may work withouth having to change the API. They
abuse other things in plus of the canvas ;)
a) The tool has painted the widgets, so record them.
or b) do them painted on the screen surface so the canvas is unaltered.
or c) keep a copy of the canvas clean of widgets, apply to it the same
effects as to the canvas, then in the next call to the tool, carefully
write it to the "snapshot" surface, so who really takes care of undo is
the magic tool.
pattern (unfinished and perhaps discontinued)has a implementation of the
third case if you want to see how it works.
Really, I think we need a way in the API to deal with thoose cases. Oh,
and a general remodelation of it :)