[Lazarus] Undo for Form Designer

Juha Manninen juha.manninen at phnet.fi
Fri Jan 1 13:39:53 CET 2010


On torstai, 31. joulukuuta 2009 17:08:11 Mattias Gaertner wrote:
> Notes:
> Changing a property (e.g. Left) changes some other properties too and
> there is no hook. So for undo you must store the whole form plus the
> descendant forms plus the referenced forms plus the source changes. This
> costs much time and memory. For example with some images you easily get
> a megabyte.
> So it would be unwise to create an undo step on every change.

It should be possible to store only the changed properties, thus using less 
memory. A simple comparison with the previous state reveals the changes.

Descendant and referenced forms make it more complicated. I think they can't 
be ignored because the program could end up being broken otherwise.

Undo would be used mostly for Delete, Move and Size, as noted in other mails 
in this thread. Including binary images in the undo buffer sounds like an 
overkill. Such images are always loaded from an external image, they are not 
edited or created in the Form Designer.

My thought here were at "abstract" level because I don't know the code enough 
now to create anything concrete.


Regards,
Juha Manninen




More information about the Lazarus mailing list